diff options
author | Esha Maharishi <esha.maharishi@mongodb.com> | 2017-04-25 12:57:02 -0400 |
---|---|---|
committer | Esha Maharishi <esha.maharishi@mongodb.com> | 2017-05-01 17:08:18 -0400 |
commit | 71f6003599e15d6f1be1bb7a0803fa3af248225d (patch) | |
tree | 4bf4049aade6d652f94ed555231b8e16dc468ffd /jstests | |
parent | 90e073b4a457656ff63bdc13b7f6eb51fafdc130 (diff) | |
download | mongo-71f6003599e15d6f1be1bb7a0803fa3af248225d.tar.gz |
SERVER-28872 remove ClusterRepairDatabaseCmd from mongos
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/auth/lib/commands_lib.js | 1 | ||||
-rw-r--r-- | jstests/core/repair_server12955.js | 19 | ||||
-rw-r--r-- | jstests/sharding/authCommands.js | 2 |
3 files changed, 12 insertions, 10 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js index 53f808ef4e0..7dfef950adf 100644 --- a/jstests/auth/lib/commands_lib.js +++ b/jstests/auth/lib/commands_lib.js @@ -3770,6 +3770,7 @@ var authCommandsLib = { { testname: "repairDatabase", command: {repairDatabase: 1}, + skipSharded: true, testcases: [ { runOnDb: adminDbName, diff --git a/jstests/core/repair_server12955.js b/jstests/core/repair_server12955.js index ce0ffa9d11e..9e586454d10 100644 --- a/jstests/core/repair_server12955.js +++ b/jstests/core/repair_server12955.js @@ -1,15 +1,18 @@ - mydb = db.getSisterDB("repair_server12955"); -mydb.dropDatabase(); +assert.commandWorked(mydb.dropDatabase()); -mydb.foo.ensureIndex({a: "text"}); -mydb.foo.insert({a: "hello world"}); +assert.commandWorked(mydb.foo.ensureIndex({a: "text"})); +assert.writeOK(mydb.foo.insert({a: "hello world"})); -before = mydb.stats().dataFileVersion; +var res = mydb.stats(); +assert.commandWorked(res); +before = res.dataFileVersion; -mydb.repairDatabase(); +assert.commandWorked(mydb.repairDatabase()); -after = mydb.stats().dataFileVersion; +res = mydb.stats(); +assert.commandWorked(res); +after = res.dataFileVersion; assert.eq(before, after); -mydb.dropDatabase(); +assert.commandWorked(mydb.dropDatabase()); diff --git a/jstests/sharding/authCommands.js b/jstests/sharding/authCommands.js index 694a09e2f9b..716e6422c52 100644 --- a/jstests/sharding/authCommands.js +++ b/jstests/sharding/authCommands.js @@ -165,7 +165,6 @@ testDB.foo.remove({a: 1}); assert.eq(null, testDB.runCommand({getlasterror: 1}).err); checkCommandSucceeded(testDB, {reIndex: 'foo'}); - checkCommandSucceeded(testDB, {repairDatabase: 1}); checkCommandSucceeded(testDB, {mapreduce: 'foo', map: map, reduce: reduce, out: 'mrOutput'}); assert.eq(100, testDB.mrOutput.count()); @@ -185,7 +184,6 @@ checkCommandFailed( testDB, {findAndModify: "foo", query: {a: 1, i: 1, j: 1}, update: {$set: {b: 1}}}); checkCommandFailed(testDB, {reIndex: 'foo'}); - checkCommandFailed(testDB, {repairDatabase: 1}); checkCommandFailed(testDB, {mapreduce: 'foo', map: map, reduce: reduce, out: 'mrOutput'}); checkCommandFailed(testDB, {drop: 'foo'}); |