diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2021-01-12 00:06:23 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-25 20:56:46 +0000 |
commit | 8d86a33ac0fb2decd8032b9d47f45bf0b388577d (patch) | |
tree | 2a50cfb8673d22ab38bbf2983881e276f2fa2b5d /jstests/core/create_indexes.js | |
parent | 5d2efc040b405871099fbd2a8547212db3755e02 (diff) | |
download | mongo-8d86a33ac0fb2decd8032b9d47f45bf0b388577d.tar.gz |
SERVER-52539 Convert createIndexes command to TypedCommand
Diffstat (limited to 'jstests/core/create_indexes.js')
-rw-r--r-- | jstests/core/create_indexes.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jstests/core/create_indexes.js b/jstests/core/create_indexes.js index 1ecab14f65b..fbf93ed3c66 100644 --- a/jstests/core/create_indexes.js +++ b/jstests/core/create_indexes.js @@ -1,11 +1,14 @@ /** * @tags: [ + * requires_fcv_49, * assumes_superuser_permissions, * ] + * fcv49 for the change to error code in createIndexes invalid field reply. */ (function() { 'use strict'; +const kUnknownIDLFieldError = 40415; var isMongos = ("isdbgrid" == db.runCommand("hello").msg); var extractResult = function(obj) { @@ -148,7 +151,7 @@ assert.commandWorked(res, 'v1 index creation should succeed'); // Test that index creation fails with an invalid top-level field. res = t.runCommand('createIndexes', {indexes: [{key: {e: 1}, name: 'e_1'}], 'invalidField': 1}); -assert.commandFailedWithCode(res, ErrorCodes.BadValue); +assert.commandFailedWithCode(res, kUnknownIDLFieldError); // Test that index creation fails with an invalid field in the index spec for index version V2. res = t.runCommand('createIndexes', |