summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
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");