diff options
Diffstat (limited to 'jstests/multiVersion/genericBinVersion/remove_invalid_index_options.js')
| -rw-r--r-- | jstests/multiVersion/genericBinVersion/remove_invalid_index_options.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/jstests/multiVersion/genericBinVersion/remove_invalid_index_options.js b/jstests/multiVersion/genericBinVersion/remove_invalid_index_options.js index c49422423c4..b9a9405c182 100644 --- a/jstests/multiVersion/genericBinVersion/remove_invalid_index_options.js +++ b/jstests/multiVersion/genericBinVersion/remove_invalid_index_options.js @@ -44,10 +44,15 @@ fpSecondary.off(); // Verify that the primary (latest) and secondary (last-lts) detect invalid index options. let validateRes = assert.commandWorked(primaryDB.runCommand({validate: collName})); -assert(!validateRes.valid); +assert(validateRes.valid); +assert.eq(validateRes.errors.length, 0); +assert.eq(validateRes.warnings.length, 2); validateRes = assert.commandWorked(secondaryDB.runCommand({validate: collName})); -assert(!validateRes.valid); +// TODO (SERVER-87985): Enable assertions. +// assert(validateRes.valid); +// assert.eq(validateRes.errors.length, 0); +// assert.eq(validateRes.warnings.length, 2); // Use collMod to remove the invalid index options in the collection. assert.commandWorked(primaryDB.runCommand({collMod: collName})); @@ -64,9 +69,13 @@ checkLog.containsJson(secondary, 23878, {fieldName: "xyz"}); // Verify that the index no longer has invalid index options. validateRes = assert.commandWorked(primaryDB.runCommand({validate: collName})); assert(validateRes.valid); +assert.eq(validateRes.errors.length, 0); +assert.eq(validateRes.warnings.length, 0); validateRes = assert.commandWorked(secondaryDB.runCommand({validate: collName})); assert(validateRes.valid); +assert.eq(validateRes.errors.length, 0); +assert.eq(validateRes.warnings.length, 0); rst.stopSet(); })(); |
