diff options
Diffstat (limited to 'jstests/noPassthrough/collmod_disallow_duplicates_restart.js')
-rw-r--r-- | jstests/noPassthrough/collmod_disallow_duplicates_restart.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/noPassthrough/collmod_disallow_duplicates_restart.js b/jstests/noPassthrough/collmod_disallow_duplicates_restart.js index ea03c03613d..7846252d5b2 100644 --- a/jstests/noPassthrough/collmod_disallow_duplicates_restart.js +++ b/jstests/noPassthrough/collmod_disallow_duplicates_restart.js @@ -34,12 +34,12 @@ const collName = 'collmod_disallow_duplicates_step_up'; let db_primary = primary.getDB('test'); let coll_primary = db_primary.getCollection(collName); -// Sets 'disallowNewDuplicateKeys' and checks that the index rejects duplicates. +// Sets 'prepareUnique' and checks that the index rejects duplicates. coll_primary.drop(); assert.commandWorked(coll_primary.createIndex({a: 1})); assert.commandWorked(coll_primary.insert({_id: 0, a: 1})); -assert.commandWorked(db_primary.runCommand( - {collMod: collName, index: {keyPattern: {a: 1}, disallowNewDuplicateKeys: true}})); +assert.commandWorked( + db_primary.runCommand({collMod: collName, index: {keyPattern: {a: 1}, prepareUnique: true}})); assert.commandFailedWithCode(coll_primary.insert({_id: 1, a: 1}), ErrorCodes.DuplicateKey); // Restarts the primary and checks the index spec is persisted. |