summaryrefslogtreecommitdiff
path: root/jstests/tool/dumprestore_auth3.js
diff options
context:
space:
mode:
authormike o'brien <mpobrien005@gmail.com>2014-11-21 20:47:55 -0500
committerErnie Hershey <ernie.hershey@10gen.com>2014-11-21 20:52:32 -0500
commit609a1492d2895ea55a9202815590636d1934a9ca (patch)
treebbfcbe8c5dbe5ce1e615f8c56e82b39767eb7ebe /jstests/tool/dumprestore_auth3.js
parent0a02891e3f155e5a187ee14c774d42cbdb290652 (diff)
downloadmongo-609a1492d2895ea55a9202815590636d1934a9ca.tar.gz
TOOLS-327 fix tests relying on --w to use --writeConcern
Diffstat (limited to 'jstests/tool/dumprestore_auth3.js')
-rw-r--r--jstests/tool/dumprestore_auth3.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/jstests/tool/dumprestore_auth3.js b/jstests/tool/dumprestore_auth3.js
index 5a4d2abdbe5..731fb5c272d 100644
--- a/jstests/tool/dumprestore_auth3.js
+++ b/jstests/tool/dumprestore_auth3.js
@@ -58,7 +58,7 @@ db.dropAllRoles();
jsTestLog("Restore foo database from dump that doesn't contain user data ");
// This test depends on W=0 to mask unique index violations.
// This should be fixed once we implement TOOLS-341
-runTool("mongorestore", mongod, {dir: dumpDir + "foo/", db: 'foo', restoreDbUsersAndRoles: "", w: "0"});
+runTool("mongorestore", mongod, {dir: dumpDir + "foo/", db: 'foo', restoreDbUsersAndRoles: "", writeConcern: "0"});
db = mongod.getDB('foo');
@@ -90,7 +90,7 @@ assert.eq(0, db.getRoles().length, "didn't drop roles");
assert.eq(0, db.bar.count(), "didn't drop 'bar' collection");
jsTestLog("Restore foo database without restoring user data, even though it's in the dump");
-runTool("mongorestore", mongod, {dir: dumpDir + "foo/", db: 'foo', w: "0"});
+runTool("mongorestore", mongod, {dir: dumpDir + "foo/", db: 'foo', writeConcern: "0"});
db = mongod.getDB('foo');
assert.soon(function() { return db.bar.findOne(); }, "no data after restore");
@@ -99,7 +99,7 @@ assert.eq(0, db.getUsers().length, "Restored users even though it shouldn't have
assert.eq(0, db.getRoles().length, "Restored roles even though it shouldn't have");
jsTestLog("Restore foo database *with* user data");
-runTool("mongorestore", mongod, {dir: dumpDir + "foo/", db: 'foo', restoreDbUsersAndRoles: "", w: "0"});
+runTool("mongorestore", mongod, {dir: dumpDir + "foo/", db: 'foo', restoreDbUsersAndRoles: "", writeConcern: "0"});
db = mongod.getDB('foo');
admindb = mongod.getDB('admin');
@@ -121,7 +121,7 @@ db.createRole({role: 'role2', roles: [], privileges:[]});
jsTestLog("Restore foo database (and user data) with --drop so it overrides the changes made");
// Restore with --drop to override the changes to user data
runTool("mongorestore", mongod,
- {dir: dumpDir + "foo/", db: 'foo', drop: "", restoreDbUsersAndRoles: "", w: "0"});
+ {dir: dumpDir + "foo/", db: 'foo', drop: "", restoreDbUsersAndRoles: "", writeConcern: "0"});
db = mongod.getDB('foo');
admindb = mongod.getDB('admin');
@@ -152,7 +152,7 @@ db.getSiblingDB('bar').createUser({user: "user2", pwd: 'pwd', roles: []});
db.getSiblingDB('admin').dropAllUsers();
jsTestLog("Restore just the admin database. User data should be restored by default");
-runTool("mongorestore", mongod, {dir: dumpDir + "admin/", db: 'admin', drop: "", w: "0"});
+runTool("mongorestore", mongod, {dir: dumpDir + "admin/", db: 'admin', drop: "", writeConcern: "0"});
db = mongod.getDB('foo');
var otherdb = db.getSiblingDB('bar');
var admindb = db.getSiblingDB('admin');
@@ -186,7 +186,7 @@ assert.eq(0, db.getRoles().length, "didn't drop roles");
assert.eq(0, db.bar.count(), "didn't drop 'bar' collection");
jsTestLog("Restore all databases");
-runTool("mongorestore", mongod, {dir: dumpDir, w: "0"});
+runTool("mongorestore", mongod, {dir: dumpDir, writeConcern: "0"});
db = mongod.getDB('foo');
assert.soon(function() { return db.bar.findOne(); }, "no data after restore");