diff options
author | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-02-13 16:52:05 -0500 |
---|---|---|
committer | Tess Avitabile <tess.avitabile@mongodb.com> | 2018-02-14 10:12:38 -0500 |
commit | daf606082c246f51c8b96341978f175543448ee1 (patch) | |
tree | f19f4715672b5602ba34ed8dd967f0ff1dcc0209 /jstests | |
parent | f7c7eae48b4656ba5df0b6c6a5662fec22899d4b (diff) | |
download | mongo-daf606082c246f51c8b96341978f175543448ee1.tar.gz |
SERVER-33314 Modify cannot_create_system_dot_indexes.js and indexes_on_indexes.js for mmapv1
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/core/cannot_create_system_dot_indexes.js | 7 | ||||
-rw-r--r-- | jstests/core/indexes_on_indexes.js | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/jstests/core/cannot_create_system_dot_indexes.js b/jstests/core/cannot_create_system_dot_indexes.js index 9912d9c95f4..c39ec6ae00b 100644 --- a/jstests/core/cannot_create_system_dot_indexes.js +++ b/jstests/core/cannot_create_system_dot_indexes.js @@ -3,6 +3,13 @@ (function() { "use strict"; + // This test should not be run on mmapv1 because the 'system.indexes' collection exists on that + // storage engine. + const isMMAPv1 = jsTest.options().storageEngine === "mmapv1"; + if (isMMAPv1) { + return; + } + // Cannot create system.indexes using the 'create' command. assert.commandFailedWithCode(db.createCollection("system.indexes"), ErrorCodes.InvalidNamespace); diff --git a/jstests/core/indexes_on_indexes.js b/jstests/core/indexes_on_indexes.js index b8318efaa50..b7c4b7edcb5 100644 --- a/jstests/core/indexes_on_indexes.js +++ b/jstests/core/indexes_on_indexes.js @@ -18,10 +18,8 @@ assert.eq(t.system.indexes.getIndexes().length, 0); print("trying via direct insertion"); - assert.writeErrorWithCode( - t.system.indexes.insert( - {v: 1, key: {_id: 1}, ns: "indexes_on_indexes.system.indexes", name: "wontwork"}), - ErrorCodes.InvalidNamespace); + assert.commandFailed(t.system.indexes.insert( + {v: 1, key: {_id: 1}, ns: "indexes_on_indexes.system.indexes", name: "wontwork"})); printjson(t.system.indexes.getIndexes()); assert.eq(t.system.indexes.getIndexes().length, 0); }()); |