summaryrefslogtreecommitdiff
path: root/jstests/tool
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2014-12-18 15:22:27 -0500
committerBenety Goh <benety@mongodb.com>2014-12-23 16:15:28 -0500
commitb896f4ca68d45f43fb4c5509843c12a114843b07 (patch)
treea4600d14a96558bad0a8a2509ef982d47b72d1b5 /jstests/tool
parentb537713667249af6cf6c1fc289d5f1956ad78900 (diff)
downloadmongo-b896f4ca68d45f43fb4c5509843c12a114843b07.tar.gz
TOOLS-488 Tools exit 1 on error
Closes #890 Signed-off-by: Benety Goh <benety@mongodb.com>
Diffstat (limited to 'jstests/tool')
-rw-r--r--jstests/tool/dumprestore3.js4
-rw-r--r--jstests/tool/stat1.js2
2 files changed, 3 insertions, 3 deletions
diff --git a/jstests/tool/dumprestore3.js b/jstests/tool/dumprestore3.js
index 96758219a2a..9fcd540a767 100644
--- a/jstests/tool/dumprestore3.js
+++ b/jstests/tool/dumprestore3.js
@@ -44,7 +44,7 @@ resetDbpath(data);
runMongoProgram( "mongodump", "--host", "127.0.0.1:"+port, "--out", data );
var x = runMongoProgram( "mongorestore", "--host", "127.0.0.1:"+replTest.ports[1], "--dir", data );
-assert.eq(x, _isWindows() ? -1 : 255, "mongorestore should exit w/ -1 on slave");
+assert.neq(x, 0, "mongorestore should exit w/ 1 on slave");
step("try mongoimport to slave");
@@ -52,7 +52,7 @@ dataFile = MongoRunner.dataDir + "/dumprestore3-other2.json";
runMongoProgram( "mongoexport", "--host", "127.0.0.1:"+port, "--out", dataFile, "--db", "foo", "--collection", "bar" );
x = runMongoProgram( "mongoimport", "--host", "127.0.0.1:"+replTest.ports[1], "--file", dataFile );
-assert.eq(x, _isWindows() ? -1 : 255, "mongoreimport should exit w/ -1 on slave"); // windows return is signed
+assert.neq(x, 0, "mongoreimport should exit w/ 1 on slave");
step("stopSet");
replTest.stopSet();
diff --git a/jstests/tool/stat1.js b/jstests/tool/stat1.js
index f3da62e7891..71ec776c170 100644
--- a/jstests/tool/stat1.js
+++ b/jstests/tool/stat1.js
@@ -13,4 +13,4 @@ x = runMongoProgram( "mongostat", "--host", "127.0.0.1:"+port, "--username", "el
assert.eq(x, 0, "mongostat should exit successfully with eliot:eliot");
x = runMongoProgram( "mongostat", "--host", "127.0.0.1:"+port, "--username", "eliot", "--password", "wrong", "--rowcount", "1", "--authenticationDatabase", "admin" );
-assert.eq(x, _isWindows() ? -1 : 255, "mongostat should exit with -1 with eliot:wrong");
+assert.neq(x, 0, "mongostat should exit with -1 with eliot:wrong");