blob: 1d3c85e3e0b7279b2536386af907b5b25010fbd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
(function() {
if (typeof getToolTest === 'undefined') {
load('jstests/configs/plain_28.config.js');
}
if (dump_targets === "archive") {
print('skipping test incompatable with archiving');
return assert(true);
}
// Tests using mongorestore to restore data from a blank db directory.
jsTest.log('Testing restoration from a blank db directory');
var toolTest = getToolTest('blank_db');
var commonToolArgs = getCommonToolArguments();
// run the restore with the blank db directory. it should succeed, but
// insert nothing.
var ret = toolTest.runTool.apply(toolTest, ['restore', '--db', 'test']
.concat(getRestoreTarget('jstests/restore/testdata/blankdb'))
.concat(commonToolArgs));
assert.eq(0, ret);
// success
toolTest.stop();
}());
|