summaryrefslogtreecommitdiff
path: root/jstests/sharding/remove1.js
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2015-10-22 16:39:12 -0400
committerRandolph Tan <randolph@10gen.com>2015-10-23 11:00:54 -0400
commitee5763eee2b7a7b8369ccf2f90d9e2e06d36fb31 (patch)
treed0cd02c425a3c7172871e978523a4258e2c46638 /jstests/sharding/remove1.js
parent7483d8652926ad277e7e74d145444fe7b3fe2088 (diff)
downloadmongo-ee5763eee2b7a7b8369ccf2f90d9e2e06d36fb31.tar.gz
SERVER-21082 Add more basic tests for addShard and removeShard
Diffstat (limited to 'jstests/sharding/remove1.js')
-rw-r--r--jstests/sharding/remove1.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/jstests/sharding/remove1.js b/jstests/sharding/remove1.js
index 0143e49dc1b..22443aae938 100644
--- a/jstests/sharding/remove1.js
+++ b/jstests/sharding/remove1.js
@@ -8,6 +8,9 @@ assert.writeOK(s.config.databases.insert({ _id: 'needToMove',
partitioned: false,
primary: 'shard0000'}));
+// Returns an error when trying to remove a shard that doesn't exist.
+assert.commandFailed(s.admin.runCommand({ removeshard: "shardz" }));
+
// first remove puts in draining mode, the second tells me a db needs to move, the third actually removes
assert( s.admin.runCommand( { removeshard: "shard0000" } ).ok , "failed to start draining shard" );
assert( !s.admin.runCommand( { removeshard: "shard0001" } ).ok , "allowed two draining shards" );