diff options
author | Ramon Fernandez <ramon@mongodb.com> | 2017-01-20 12:56:03 -0500 |
---|---|---|
committer | Ramon Fernandez <ramon@mongodb.com> | 2017-01-20 12:56:03 -0500 |
commit | 05c5ac4a665ad5ba1209c2089c47b615d798e7aa (patch) | |
tree | ed39328f1aa99ea9ec10fc81279ae81aa6219bdb /src/mongo/gotools/test/qa-tests/jstests/restore/objcheck_valid_bson.js | |
parent | 774514cfad04866b42a1deb27b48488dec0f7520 (diff) | |
download | mongo-05c5ac4a665ad5ba1209c2089c47b615d798e7aa.tar.gz |
Import tools: 17fbdf31abca50cdfe27482b05b1476f42ecab0a from branch v3.4
ref: 4a0fbf5245..17fbdf31ab
for: 3.4.2
TOOLS-1541 support exporting views
TOOLS-1549 --gssapiServiceName should not require --gssapiHostName in the tools
TOOLS-1553 PreProcessing is failling with "got invalid document size"
TOOLS-1559 TestCommandOpGetMoreLiveDB is failing after upgrade to 3.4 in evergreen
TOOLS-1569 mongo-replay crashes during playback
TOOLS-1576 nil pointer derereference when error occurs
TOOLS-1579 Progress bar exceeding 100%
Remove test directory, not needed for server import.
Diffstat (limited to 'src/mongo/gotools/test/qa-tests/jstests/restore/objcheck_valid_bson.js')
-rw-r--r-- | src/mongo/gotools/test/qa-tests/jstests/restore/objcheck_valid_bson.js | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/mongo/gotools/test/qa-tests/jstests/restore/objcheck_valid_bson.js b/src/mongo/gotools/test/qa-tests/jstests/restore/objcheck_valid_bson.js deleted file mode 100644 index baa2d67545d..00000000000 --- a/src/mongo/gotools/test/qa-tests/jstests/restore/objcheck_valid_bson.js +++ /dev/null @@ -1,46 +0,0 @@ -(function() { - - load("jstests/configs/standard_dump_targets.config.js"); - // Tests that running mongorestore with --objcheck on valid bson - // files restores the data successfully. - - jsTest.log('Testing restoration with --objcheck'); - - var toolTest = new ToolTest('objcheck_valid_bson'); - toolTest.startDB('foo'); - - // where we'll put the dump - var dumpTarget = 'objcheck_valid_bson_dump'; - resetDbpath(dumpTarget); - - // the db and collection we will use - var testDB = toolTest.db.getSiblingDB('test'); - var testColl = testDB.coll; - - // insert some data - var data = []; - for (var i = 0; i < 50; i++) { - data.push({_id: i}); - } - testColl.insertMany(data); - // sanity check the insert worked - assert.eq(50, testColl.count()); - - // dump the data - var ret = toolTest.runTool.apply(toolTest, ['dump'].concat(getDumpTarget(dumpTarget))); - assert.eq(0, ret); - - // drop the data - testDB.dropDatabase(); - - // restore the data, with --objcheck - ret = toolTest.runTool.apply(toolTest, ['restore'].concat(getRestoreTarget(dumpTarget))); - assert.eq(0, ret); - - // make sure the restore completed succesfully - assert.eq(50, testColl.count()); - - // success - toolTest.stop(); - -}()); |