diff options
author | Mathias Stearn <mathias@10gen.com> | 2017-06-20 17:07:59 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2017-06-28 11:57:04 -0400 |
commit | 227c848b6ab7055e56745705eb708af40bb73320 (patch) | |
tree | 41aea1604d61742f793f7738947fa9561257a4f5 /jstests/core/views/invalid_system_views.js | |
parent | e3fe73454a6e558fc61c19456510d5f93152721d (diff) | |
download | mongo-227c848b6ab7055e56745705eb708af40bb73320.tar.gz |
SERVER-18292 Re-enable tests tagged with SERVER-18292
Diffstat (limited to 'jstests/core/views/invalid_system_views.js')
-rw-r--r-- | jstests/core/views/invalid_system_views.js | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/jstests/core/views/invalid_system_views.js b/jstests/core/views/invalid_system_views.js index 170c0131251..977e31201d2 100644 --- a/jstests/core/views/invalid_system_views.js +++ b/jstests/core/views/invalid_system_views.js @@ -4,6 +4,7 @@ */ (function() { "use strict"; + const isMongos = db.runCommand({isdbgrid: 1}).isdbgrid; function runTest(badViewDefinition) { let viewsDB = db.getSiblingDB("invalid_system_views"); @@ -30,12 +31,17 @@ " in system.views"; } - // Commands that run on existing regular collections should not be impacted by the presence - // of invalid views. - assert.commandWorked( - db.adminCommand( - {applyOps: [{op: "c", ns: "invalid_system_views.$cmd", o: {drop: "collection3"}}]}), - makeErrorMessage("applyOps")); + if (!isMongos) { + // Commands that run on existing regular collections should not be impacted by the + // presence of invalid views. However, applyOps doesn't work on mongos. + assert.commandWorked( + db.adminCommand( // + { + applyOps: + [{op: "c", ns: "invalid_system_views.$cmd", o: {drop: "collection3"}}] + }), + makeErrorMessage("applyOps")); + } assert.writeOK(viewsDB.collection.insert({y: "baz"}), makeErrorMessage("insert")); @@ -81,8 +87,8 @@ assert.commandWorked(viewsDB.collection.reIndex(), makeErrorMessage("reIndex")); const storageEngine = jsTest.options().storageEngine; - if (storageEngine === "ephemeralForTest" || storageEngine === "inMemory") { - print("Not testing compact command on ephemeral storage engine " + storageEngine); + if (isMongos || storageEngine === "ephemeralForTest" || storageEngine === "inMemory") { + print("Not testing compact command on mongos or ephemeral storage engine"); } else { assert.commandWorked(viewsDB.runCommand({compact: "collection", force: true}), makeErrorMessage("compact")); |