diff options
Diffstat (limited to 'jstests/tool/exportimport3.js')
-rw-r--r-- | jstests/tool/exportimport3.js | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/jstests/tool/exportimport3.js b/jstests/tool/exportimport3.js index 686ff467a6f..481db797964 100644 --- a/jstests/tool/exportimport3.js +++ b/jstests/tool/exportimport3.js @@ -1,27 +1,25 @@ // exportimport3.js -t = new ToolTest( "exportimport3" ); +t = new ToolTest("exportimport3"); -c = t.startDB( "foo" ); -assert.eq( 0 , c.count() , "setup1" ); -c.save({a:1}); -c.save({a:2}); -c.save({a:3}); -c.save({a:4}); -c.save({a:5}); +c = t.startDB("foo"); +assert.eq(0, c.count(), "setup1"); +c.save({a: 1}); +c.save({a: 2}); +c.save({a: 3}); +c.save({a: 4}); +c.save({a: 5}); -assert.eq( 5 , c.count() , "setup2" ); +assert.eq(5, c.count(), "setup2"); - -t.runTool( "export" , "--jsonArray" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo" ); +t.runTool("export", "--jsonArray", "--out", t.extFile, "-d", t.baseName, "-c", "foo"); c.drop(); -assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" ); - -t.runTool( "import" , "--jsonArray" , "--file" , t.extFile , "-d" , t.baseName , "-c" , "foo" ); +assert.eq(0, c.count(), "after drop", "-d", t.baseName, "-c", "foo"); -assert.soon( "c.findOne()" , "no data after sleep" ); -assert.eq( 5 , c.count() , "after restore 2" ); +t.runTool("import", "--jsonArray", "--file", t.extFile, "-d", t.baseName, "-c", "foo"); +assert.soon("c.findOne()", "no data after sleep"); +assert.eq(5, c.count(), "after restore 2"); t.stop(); |