diff options
Diffstat (limited to 'src/mongo/gotools/src/github.com/mongodb/mongo-tools/test/qa-tests/jstests/restore/oplog_replay_no_oplog.js')
-rw-r--r-- | src/mongo/gotools/src/github.com/mongodb/mongo-tools/test/qa-tests/jstests/restore/oplog_replay_no_oplog.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mongo/gotools/src/github.com/mongodb/mongo-tools/test/qa-tests/jstests/restore/oplog_replay_no_oplog.js b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/test/qa-tests/jstests/restore/oplog_replay_no_oplog.js new file mode 100644 index 00000000000..eae7db1519e --- /dev/null +++ b/src/mongo/gotools/src/github.com/mongodb/mongo-tools/test/qa-tests/jstests/restore/oplog_replay_no_oplog.js @@ -0,0 +1,19 @@ +(function() { + + load("jstests/configs/standard_dump_targets.config.js"); + // Tests using mongorestore with --oplogReplay when no oplog.bson file is present. + + jsTest.log('Testing restoration with --oplogReplay and no oplog.bson file'); + + var toolTest = new ToolTest('oplog_replay_no_oplog'); + toolTest.startDB('foo'); + + // run the restore, with a dump directory that has no oplog.bson file + var ret = toolTest.runTool.apply(toolTest, ['restore', '--oplogReplay'] + .concat(getRestoreTarget('restore/testdata/dump_empty'))); + assert.neq(0, ret); + + // success + toolTest.stop(); + +}()); |