summaryrefslogtreecommitdiff
path: root/jstests/sharding/authmr.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/authmr.js')
-rw-r--r--jstests/sharding/authmr.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/jstests/sharding/authmr.js b/jstests/sharding/authmr.js
index 31a1bcf18f9..52e69e88848 100644
--- a/jstests/sharding/authmr.js
+++ b/jstests/sharding/authmr.js
@@ -20,12 +20,19 @@ 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) {
- assert.writeOK(collection.remove(pattern));
+ collection.remove(pattern);
+ assertGLEOK(collection.getDB().getLastErrorObj());
}
function assertInsert(collection, obj) {
- assert.writeOK(collection.insert(obj));
+ collection.insert(obj);
+ assertGLEOK(collection.getDB().getLastErrorObj());
}
var cluster = new ShardingTest("authwhere", 1, 0, 1,