summaryrefslogtreecommitdiff
path: root/buildscripts
diff options
context:
space:
mode:
authorMike Dirolf <mike@10gen.com>2009-09-25 15:51:11 -0400
committerMike Dirolf <mike@10gen.com>2009-09-25 15:51:11 -0400
commit2fedd80c4dda59cf2779a947f033cf730ba41901 (patch)
tree014abd6c743658b81ca96d1fb4183aa7898ef4d8 /buildscripts
parente815aac1acf8bd7d34b317e86c84cbd0aa711f70 (diff)
downloadmongo-2fedd80c4dda59cf2779a947f033cf730ba41901.tar.gz
minor: fix for shell exit code on bad hostname, plus update tests
Diffstat (limited to 'buildscripts')
-rw-r--r--buildscripts/test_shell.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/buildscripts/test_shell.py b/buildscripts/test_shell.py
index 2d25c3d111a..eb6a032a9e4 100644
--- a/buildscripts/test_shell.py
+++ b/buildscripts/test_shell.py
@@ -28,7 +28,6 @@ import os
"""Exit codes for MongoDB."""
BADOPTS = 2
-BADHOST = 14
NOCONNECT = 255
"""Path to the mongo shell executable to be tested."""
@@ -53,7 +52,7 @@ class TestShell(unittest.TestCase):
out = mongo_h.communicate()
self.assertEqual(out, mongo_help.communicate())
- self.assert_(out[0].startswith("usage:"))
+ self.assert_("usage:" in out[0])
self.assertEqual(0, mongo_h.returncode)
self.assertEqual(0, mongo_help.returncode)
@@ -164,7 +163,7 @@ class TestShell(unittest.TestCase):
out = mongo.communicate()
self.assert_("url: " + test in out[0])
self.assert_("connecting to: " + test in out[0])
- self.assertEqual(BADHOST, mongo.returncode)
+ self.assertEqual(NOCONNECT, mongo.returncode)
mongo = self.open_mongo([non_exist_js, test, test_txt])
out = mongo.communicate()
@@ -176,7 +175,7 @@ class TestShell(unittest.TestCase):
out = mongo.communicate()
self.assert_("url: " + non_exist_txt in out[0])
self.assert_("connecting to: " + non_exist_txt in out[0])
- self.assertEqual(BADHOST, mongo.returncode)
+ self.assertEqual(NOCONNECT, mongo.returncode)
def test_multiple_files(self):
dirname = os.path.dirname(__file__)