summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-04-08 14:43:56 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2015-04-09 09:40:02 -0400
commitc64199204eb3873cd87784efaed440afc3d66f94 (patch)
treeaba4324b95afbf634b7fa23a26e2cfd8bb692466 /jstests
parent221772437968c316bc842e7899950d746eac755e (diff)
downloadmongo-c64199204eb3873cd87784efaed440afc3d66f94.tar.gz
SERVER-17723 Remove 'source' from the error message for collectionToCapped'
Helps unify the error messages returned for mising collections between sharded and non-sharded cluster. Besides there is no source and destination database for these two commands.
Diffstat (limited to 'jstests')
-rw-r--r--jstests/core/convert_to_capped_nonexistant.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/jstests/core/convert_to_capped_nonexistant.js b/jstests/core/convert_to_capped_nonexistant.js
index dcda30d7f8b..ea5e1bf951d 100644
--- a/jstests/core/convert_to_capped_nonexistant.js
+++ b/jstests/core/convert_to_capped_nonexistant.js
@@ -7,13 +7,16 @@ testDb.dropDatabase();
// Database does not exist here
var result = testDb.runCommand({convertToCapped: 'foo', size: 1024});
assert.eq(result.ok, 0, "converting a nonexistent to capped worked and should not have");
-assert.eq(result.errmsg, "source database convert_to_capped_nonexistent does not exist",
- "converting a nonexistent to capped failed but for the wrong reason");
+assert.eq(result.code, 26, "converting a nonexistent to capped failed, but code has changed");
+assert.eq(result.errmsg,
+ "database convert_to_capped_nonexistent not found",
+ "converting a nonexistent to capped failed, but message has changed");
// Database exists, but collection doesn't
testDb.coll.insert({});
var result = testDb.runCommand({convertToCapped: 'foo', size: 1024});
assert.eq(result.ok, 0, "converting a nonexistent to capped worked and should not have");
-assert.eq(result.errmsg, "source collection convert_to_capped_nonexistent.foo does not exist",
- "converting a nonexistent to capped failed but for the wrong reason");
+assert.eq(result.errmsg,
+ "source collection convert_to_capped_nonexistent.foo does not exist",
+ "converting a nonexistent to capped failed, but message has changed");