diff options
author | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-04-04 08:02:40 -0400 |
---|---|---|
committer | Gregory Wlodarek <gregory.wlodarek@mongodb.com> | 2019-04-04 08:02:40 -0400 |
commit | e6abd76d9ca9e03256ceadda7d9eb54994239b42 (patch) | |
tree | a99f743e3cf7f39a9bee51504c32d54053a0b92a /jstests/core/list_collections1.js | |
parent | 4459b439700f096a7b6287fdddde592db8934fe2 (diff) | |
download | mongo-e6abd76d9ca9e03256ceadda7d9eb54994239b42.tar.gz |
SERVER-40345 Change calls involving the 'temp' field in the 'create' command to be done through the 'applyOps' command
Diffstat (limited to 'jstests/core/list_collections1.js')
-rw-r--r-- | jstests/core/list_collections1.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/jstests/core/list_collections1.js b/jstests/core/list_collections1.js index 33377c2db97..ddc563cf852 100644 --- a/jstests/core/list_collections1.js +++ b/jstests/core/list_collections1.js @@ -1,6 +1,7 @@ // Cannot implicitly shard accessed collections because of collection existing when none // expected. -// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_getmore] +// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_getmore, +// requires_replication] // Basic functional tests for the listCollections command. // @@ -82,7 +83,8 @@ assert.commandWorked(mydb.dropDatabase()); assert.commandWorked(mydb.createCollection("foo")); - assert.commandWorked(mydb.createCollection("bar", {temp: true})); + assert.commandWorked(mydb.runCommand( + {applyOps: [{op: "c", ns: mydb.getName() + ".$cmd", o: {create: "bar", temp: true}}]})); assert.eq(1, cursorCountMatching(getListCollectionsCursor(), function(c) { return c.name === "foo" && c.options.temp === undefined; })); @@ -96,7 +98,8 @@ assert.commandWorked(mydb.dropDatabase()); assert.commandWorked(mydb.createCollection("foo")); - assert.commandWorked(mydb.createCollection("bar", {temp: true})); + assert.commandWorked(mydb.runCommand( + {applyOps: [{op: "c", ns: mydb.getName() + ".$cmd", o: {create: "bar", temp: true}}]})); assert.eq(2, cursorCountMatching(getListCollectionsCursor({filter: {}}), function(c) { return c.name === "foo" || c.name === "bar"; })); |