summaryrefslogtreecommitdiff
path: root/jstests/sharding/auth_add_shard.js
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-02-22 10:51:51 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-02-23 10:26:04 -0500
commit5c48613edb4fa209b7b3bd966f35902cb31ede66 (patch)
tree10b7d9bb214a51ac935e9a890efe53ffedf0ece6 /jstests/sharding/auth_add_shard.js
parent5a2d2815728c06ad3bc50766354fe7524e02670d (diff)
downloadmongo-5c48613edb4fa209b7b3bd966f35902cb31ede66.tar.gz
SERVER-22765 Improve error checking in sharding tests
Some sharding tests do not check that the enableSharding, shardCollection, moveChunk and etc. commands worked.
Diffstat (limited to 'jstests/sharding/auth_add_shard.js')
-rw-r--r--jstests/sharding/auth_add_shard.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/jstests/sharding/auth_add_shard.js b/jstests/sharding/auth_add_shard.js
index 78db5dd28e6..8435c768c4f 100644
--- a/jstests/sharding/auth_add_shard.js
+++ b/jstests/sharding/auth_add_shard.js
@@ -48,7 +48,7 @@ MongoRunner.stopMongod(conn);
//start mongod again, this time with keyfile
var conn = MongoRunner.runMongod({keyFile: "jstests/libs/key1"});
//try adding the new shard
-printjson(assert.commandWorked(admin.runCommand({ addShard: conn.host })));
+assert.commandWorked(admin.runCommand({ addShard: conn.host }));
//Add some data
var db = mongos.getDB("foo");
@@ -80,7 +80,7 @@ st.startBalancer();
//--------------- Test 3 --------------------
// now drain the shard
-printjson(assert.commandWorked(admin.runCommand({removeShard: conn.host})));
+assert.commandWorked(admin.runCommand({removeShard: conn.host}));
// give it some time to drain
assert.soon(function() {