diff options
author | Randolph Tan <randolph@10gen.com> | 2014-03-04 17:41:56 -0500 |
---|---|---|
committer | Randolph Tan <randolph@10gen.com> | 2014-04-21 16:53:25 -0400 |
commit | 7acafe85d9bdd63122c19ba1cca86a7f55174941 (patch) | |
tree | 234effd8e5a5b6c63d8b12c74de2d9acb78a7509 /jstests/sharding/authmr.js | |
parent | e87b42c4f13e48078f5c4aefba3caf18dcfba072 (diff) | |
download | mongo-7acafe85d9bdd63122c19ba1cca86a7f55174941.tar.gz |
SERVER-13425 migrate sharding jstest suite to use write commands api
Diffstat (limited to 'jstests/sharding/authmr.js')
-rw-r--r-- | jstests/sharding/authmr.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/jstests/sharding/authmr.js b/jstests/sharding/authmr.js index 52e69e88848..31a1bcf18f9 100644 --- a/jstests/sharding/authmr.js +++ b/jstests/sharding/authmr.js @@ -20,19 +20,12 @@ var test1User = { roles: [{role: 'readWrite', db: 'test1', hasRole: true, canDelegate: false}] }; -function assertGLEOK(status) { - assert(status.ok && status.err === null, - "Expected OK status object; found " + tojson(status)); -} - function assertRemove(collection, pattern) { - collection.remove(pattern); - assertGLEOK(collection.getDB().getLastErrorObj()); + assert.writeOK(collection.remove(pattern)); } function assertInsert(collection, obj) { - collection.insert(obj); - assertGLEOK(collection.getDB().getLastErrorObj()); + assert.writeOK(collection.insert(obj)); } var cluster = new ShardingTest("authwhere", 1, 0, 1, |