blob: 797f025ad194fd8f33053670f89b53ccff3dc722 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/**
* Tests that collMod fails when an unrecognized field is included in its 'index' option.
*
* @tags: [
* requires_fcv_47,
* requires_non_retryable_commands
* ]
*/
(function() {
const collName = "collMod_index_invalid_option";
assert.commandWorked(db.getCollection(collName).createIndex({a: 1}, {expireAfterSeconds: 100}));
assert.commandFailedWithCode(db.runCommand({
collMod: collName,
index: {keyPattern: {a: 1}, expireAfterSeconds: 200, invalidOption: 1}
}),
ErrorCodes.InvalidOptions);
})();
|