summaryrefslogtreecommitdiff
path: root/jstests/core/apply_ops_invalid_index_spec.js
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2020-05-07 09:56:16 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-07 14:08:38 +0000
commit02394766d7aa0f17a9fbf826e9767ae40e41c59a (patch)
tree01c3044cdde63d0a1a733063d7f10f792270704b /jstests/core/apply_ops_invalid_index_spec.js
parent474e6228cf95e16aa205256a0f15ef9f9388252d (diff)
downloadmongo-02394766d7aa0f17a9fbf826e9767ae40e41c59a.tar.gz
SERVER-38961 remove IndexBuildTest.supportsTwoPhaseIndexBuild() references from jsCore and disk tests
Diffstat (limited to 'jstests/core/apply_ops_invalid_index_spec.js')
-rw-r--r--jstests/core/apply_ops_invalid_index_spec.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/jstests/core/apply_ops_invalid_index_spec.js b/jstests/core/apply_ops_invalid_index_spec.js
index 5fe5df387d0..71031378df2 100644
--- a/jstests/core/apply_ops_invalid_index_spec.js
+++ b/jstests/core/apply_ops_invalid_index_spec.js
@@ -17,8 +17,6 @@
(function() {
'use strict';
-load('jstests/noPassthrough/libs/index_build.js');
-
const t = db.apply_ops_invalid_index_spec;
t.drop();
@@ -35,60 +33,4 @@ assert.commandFailedWithCode(t.createIndex({a: 1}, {v: 2, name: 'a_1_base_v2', u
ErrorCodes.InvalidIndexSpecificationOption);
assert.commandFailedWithCode(t.createIndex({a: 1}, {v: 1, name: 'a_1_base_v1', unknown: 1}),
ErrorCodes.InvalidIndexSpecificationOption);
-
-// It is not possible to test createIndexes in applyOps with two-phase-index-builds support because
-// that command is not accepted by applyOps in that mode.
-if (IndexBuildTest.supportsTwoPhaseIndexBuild(db.getMongo())) {
- jsTestLog('Skipping applyOps test cases. Cannot start two phase index builds using applyOps');
- return;
-}
-
-// A createIndexes command for a v:2 index with an unknown field in the index spec should fail.
-assert.commandFailedWithCode(db.adminCommand({
- applyOps: [{
- op: 'c',
- ns: cmdNs,
- o: {
- createIndexes: t.getName(),
- v: 2,
- key: {a: 1},
- name: 'a_1_create_v2',
- unknown: 1,
- },
- }],
-}),
- ErrorCodes.InvalidIndexSpecificationOption);
-
-// A createIndexes command for a background index with unknown field in the index spec should
-// fail.
-assert.commandFailedWithCode(db.adminCommand({
- applyOps: [{
- op: 'c',
- ns: cmdNs,
- o: {
- createIndexes: t.getName(),
- v: 2,
- key: {a: 1},
- background: true,
- name: 'a_1_background',
- unknown: 1,
- },
- }],
-}),
- ErrorCodes.InvalidIndexSpecificationOption);
-
-// A createIndexes command for a v:1 index with an unknown field in the index spec should work.
-const res1 = assert.commandWorked(db.adminCommand({
- applyOps: [{
- op: 'c',
- ns: cmdNs,
- o: {
- createIndexes: t.getName(),
- v: 1,
- key: {a: 1},
- name: 'a_1_create_v1',
- unknown: 1,
- },
- }],
-}));
})();