summaryrefslogtreecommitdiff
path: root/jstests/auth/resource_pattern_matching.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/auth/resource_pattern_matching.js')
-rw-r--r--jstests/auth/resource_pattern_matching.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/jstests/auth/resource_pattern_matching.js b/jstests/auth/resource_pattern_matching.js
index 7261890ef9d..b02fe7951e6 100644
--- a/jstests/auth/resource_pattern_matching.js
+++ b/jstests/auth/resource_pattern_matching.js
@@ -28,16 +28,14 @@ function setup_dbs_and_cols(db) {
var test_db_a = db.getSiblingDB("a");
var test_db_b = db.getSiblingDB("b");
- test_db_a.dropDatabase();
- test_db_b.dropDatabase();
+ assert.commandWorked(test_db_a.dropDatabase({w: 'majority'}));
+ assert.commandWorked(test_db_b.dropDatabase({w: 'majority'}));
- test_db_a.createCollection("a");
- test_db_a.createCollection("b");
+ assert.commandWorked(test_db_a.createCollection("a", {writeConcern: {w: 'majority'}}));
+ assert.commandWorked(test_db_a.createCollection("b", {writeConcern: {w: 'majority'}}));
- test_db_b.createCollection("a");
- test_db_b.createCollection("b");
-
- db.getLastError('majority');
+ assert.commandWorked(test_db_b.createCollection("a", {writeConcern: {w: 'majority'}}));
+ assert.commandWorked(test_db_b.createCollection("b", {writeConcern: {w: 'majority'}}));
}
function grant_privileges(granter, privileges) {