blob: 2be7fa95e7c3149dcf0daef625fa701bc8f39f2d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/**
* Test that commitQuorum option is not supported on standalones for index creation.
* Note: noPassthrough/commit_quorum.js - Verifies the commitQuorum behavior for replica sets.
*/
(function() {
'use strict';
const standalone = MongoRunner.runMongod();
const db = standalone.getDB("test");
jsTestLog("Create index");
assert.commandFailedWithCode(
db.runCommand(
{createIndexes: "coll", indexes: [{name: "x_1", key: {x: 1}}], commitQuorum: "majority"}),
ErrorCodes.BadValue);
MongoRunner.stopMongod(standalone);
})();
|