3
t = new ToolTest( "exportimport2" );
5
c = t.startDB( "foo" );
6
assert.eq( 0 , c.count() , "setup1" );
8
assert.eq( 1 , c.count() , "setup2" );
11
t.runTool( "export" , "--dbpath" , t.dbpath , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo" );
13
resetDbpath( t.dbpath );
14
assert.eq( 0 , listFiles( t.dbpath ).length , "clear" );
16
t.runTool( "import" , "--dbpath" , t.dbpath , "--file" , t.extFile , "-d" , t.baseName , "-c" , "foo" );
18
c = t.startDB( "foo" );
19
assert.soon( "c.findOne()" , "no data after startup" );
20
assert.eq( 1 , c.count() , "after restore 2" );
21
assert.eq( 22 , c.findOne().a , "after restore 2" );