summaryrefslogtreecommitdiff
path: root/jstests/tool
diff options
context:
space:
mode:
authorSam Helman <sam.helman@10gen.com>2014-10-02 14:16:41 -0400
committerBenety Goh <benety@mongodb.com>2014-10-07 10:42:02 -0400
commiteca7242b055a618ae44835d59a4f75b2d3ae6cba (patch)
treeeb494ff1d79660ef95a1934ae84c58cf78646ae1 /jstests/tool
parent92c176145ba3b8d204d5a35c98017df48969977c (diff)
downloadmongo-eca7242b055a618ae44835d59a4f75b2d3ae6cba.tar.gz
SERVER-15517 Remove spaces from query in dumprestore7.js, exportimport4.js and exportimport5.js
Closes #806 Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'jstests/tool')
-rw-r--r--jstests/tool/dumprestore7.js7
-rw-r--r--jstests/tool/exportimport4.js4
-rw-r--r--jstests/tool/exportimport5.js8
3 files changed, 11 insertions, 8 deletions
diff --git a/jstests/tool/dumprestore7.js b/jstests/tool/dumprestore7.js
index e80db4c7d34..c6f30686b49 100644
--- a/jstests/tool/dumprestore7.js
+++ b/jstests/tool/dumprestore7.js
@@ -43,9 +43,12 @@ var master = replTest.getMaster();
step("try mongodump with $timestamp");
var data = MongoRunner.dataDir + "/dumprestore7-dump1/";
-var query = "{\"ts\":{\"$gt\":{\"$timestamp\" : {\"t\":"+ time.ts.t + ",\"i\":" + time.ts.i +" }}}}";
+var query = "{\"ts\":{\"$gt\":{\"$timestamp\":{\"t\":"+ time.ts.t + ",\"i\":" + time.ts.i +"}}}}";
-runMongoProgram( "mongodump", "--host", "127.0.0.1:"+replTest.ports[0], "--db", "local", "--collection", "oplog.rs", "--query", query, "--out", data );
+MongoRunner.runMongoTool( "mongodump",
+ { "host": "127.0.0.1:"+replTest.ports[0],
+ "db": "local", "collection": "oplog.rs",
+ "query": query, "out": data });
step("try mongorestore from $timestamp");
diff --git a/jstests/tool/exportimport4.js b/jstests/tool/exportimport4.js
index cb2321a5eaa..605e21b7337 100644
--- a/jstests/tool/exportimport4.js
+++ b/jstests/tool/exportimport4.js
@@ -20,7 +20,7 @@ install_test_data = function() {
// attempt to export fields without NaN
install_test_data();
-t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{ a: { \"$nin\": [ NaN ] } }" );
+t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{a:{\"$nin\":[NaN]}}" );
c.drop();
assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" );
@@ -32,7 +32,7 @@ assert.eq( 2 , c.count() , "after restore 1" );
// attempt to export fields with NaN
install_test_data();
-t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{ a: NaN }" );
+t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{a:NaN}" );
c.drop();
assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" );
diff --git a/jstests/tool/exportimport5.js b/jstests/tool/exportimport5.js
index 00fe5ced549..427b03f0232 100644
--- a/jstests/tool/exportimport5.js
+++ b/jstests/tool/exportimport5.js
@@ -21,7 +21,7 @@ install_test_data = function() {
// attempt to export fields without Infinity
install_test_data();
-t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{ a: { \"$nin\": [ Infinity ] } }" );
+t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{a:{\"$nin\":[Infinity]}}" );
c.drop();
assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" );
@@ -33,7 +33,7 @@ assert.eq( 3 , c.count() , "after restore 1" );
// attempt to export fields with Infinity
install_test_data();
-t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{ a: Infinity }" );
+t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{a:Infinity}" );
c.drop();
assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" );
@@ -45,7 +45,7 @@ assert.eq( 3 , c.count() , "after restore 2" );
// attempt to export fields without -Infinity
install_test_data();
-t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{ a: { \"$nin\": [ -Infinity ] } }" );
+t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{a:{\"$nin\":[-Infinity]}}" );
c.drop();
assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" );
@@ -57,7 +57,7 @@ assert.eq( 4 , c.count() , "after restore 3" );
// attempt to export fields with -Infinity
install_test_data();
-t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{ a: -Infinity }" );
+t.runTool( "export" , "--out" , t.extFile , "-d" , t.baseName , "-c" , "foo", "-q", "{a:-Infinity}" );
c.drop();
assert.eq( 0 , c.count() , "after drop" , "-d" , t.baseName , "-c" , "foo" );