summaryrefslogtreecommitdiff
path: root/jstests/tool
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2017-06-27 12:01:24 -0400
committerBenety Goh <benety@mongodb.com>2017-06-28 16:52:32 -0400
commitc14f4e64c98b70b118bc0f2ee9c575f189de0038 (patch)
treec6fb2b090d8c3c1828c502147bfff7775eabfd7d /jstests/tool
parentb964786f0ce519caf214f4c321d2a2abf9580365 (diff)
downloadmongo-c14f4e64c98b70b118bc0f2ee9c575f189de0038.tar.gz
SERVER-29876 change tool_replset.js to drop collection instead of database
Diffstat (limited to 'jstests/tool')
-rw-r--r--jstests/tool/tool_replset.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/jstests/tool/tool_replset.js b/jstests/tool/tool_replset.js
index 1608acbe992..7829e46f042 100644
--- a/jstests/tool/tool_replset.js
+++ b/jstests/tool/tool_replset.js
@@ -34,19 +34,20 @@
"tool_replset/127.0.0.1:" + replTest.ports[0] + ",127.0.0.1:" + replTest.ports[1];
// Test with mongodump/mongorestore
- print("dump the db");
var data = MongoRunner.dataDir + "/tool_replset-dump1/";
+ print("using mongodump to dump the db to " + data);
var exitCode = MongoRunner.runMongoTool("mongodump", {
host: replSetConnString,
out: data,
});
assert.eq(0, exitCode, "mongodump failed to dump from the replica set");
- print("db successfully dumped, dropping now");
- master.getDB("foo").dropDatabase();
+ print("db successfully dumped to " + data +
+ ". dropping collection before testing the restore process");
+ assert(master.getDB("foo").bar.drop());
replTest.awaitReplication();
- print("restore the db");
+ print("using mongorestore to restore the db from " + data);
exitCode = MongoRunner.runMongoTool("mongorestore", {
host: replSetConnString,
dir: data,