From 609a1492d2895ea55a9202815590636d1934a9ca Mon Sep 17 00:00:00 2001 From: mike o'brien Date: Fri, 21 Nov 2014 20:47:55 -0500 Subject: TOOLS-327 fix tests relying on --w to use --writeConcern --- jstests/tool/dumprestore_auth3.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'jstests/tool/dumprestore_auth3.js') 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"); -- cgit v1.2.1