summaryrefslogtreecommitdiff
path: root/jstests/sharding/remove1.js
diff options
context:
space:
mode:
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" );