summaryrefslogtreecommitdiff
path: root/jstests/core/list_collections1.js
diff options
context:
space:
mode:
authorArun Banala <arun.banala@mongodb.com>2020-11-23 17:32:44 +0530
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-12-02 10:27:44 +0000
commit6cf43fbc5c296c26ec03193c70c5fc3ba742c942 (patch)
treeda64ea032d6a9025986ae721a0c03c0502e15aab /jstests/core/list_collections1.js
parent8f4b2d598b492b10f3eee35e5401098f8aeb79de (diff)
downloadmongo-6cf43fbc5c296c26ec03193c70c5fc3ba742c942.tar.gz
SERVER-51653 Ban uses of unstable command parameters with apiStrict:true
Diffstat (limited to 'jstests/core/list_collections1.js')
-rw-r--r--jstests/core/list_collections1.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/jstests/core/list_collections1.js b/jstests/core/list_collections1.js
index 700407c0843..34a67d6ad6f 100644
--- a/jstests/core/list_collections1.js
+++ b/jstests/core/list_collections1.js
@@ -1,7 +1,7 @@
// Cannot implicitly shard accessed collections because of collection existing when none
// expected.
// @tags: [assumes_no_implicit_collection_creation_after_drop, requires_getmore,
-// requires_replication]
+// requires_replication, requires_fcv_49]
// Basic functional tests for the listCollections command.
//
@@ -334,4 +334,10 @@ assert.commandFailedWithCode(mydb.runCommand("listCollections", {includePendingD
assert.commandWorked(mydb.runCommand("listCollections", {includePendingDrops: 1}));
assert.commandWorked(mydb.runCommand("listCollections", {includePendingDrops: true}));
assert.commandWorked(mydb.runCommand("listCollections", {includePendingDrops: false}));
+
+// Verify that 'includePendingDrops' field is unstable in API version 1.
+assert.commandFailedWithCode(
+ mydb.runCommand("listCollections",
+ {includePendingDrops: false, apiVersion: "1", apiStrict: true}),
+ ErrorCodes.APIStrictError);
}());