summaryrefslogtreecommitdiff
path: root/jstests/auth/lib
diff options
context:
space:
mode:
authorDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-09-20 15:00:47 -0400
committerDaniel Gottlieb <daniel.gottlieb@mongodb.com>2018-09-20 15:00:47 -0400
commit630eabac0591f207b29b6be014257387a9a7a904 (patch)
tree463bd23d64f3dec795b2fcf769d88a8fbe10ef50 /jstests/auth/lib
parent4ec12c35a07a8c0f3a30692aec413a71fdab30de (diff)
downloadmongo-630eabac0591f207b29b6be014257387a9a7a904.tar.gz
SERVER-37192: Move $backupCursor to enterprise.
Diffstat (limited to 'jstests/auth/lib')
-rw-r--r--jstests/auth/lib/commands_lib.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index 0a485990027..4f402dad1cd 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -84,6 +84,11 @@ authorization failure.
Set of options to be passed to your 'command' function. Can be used to send different versions of
the command depending on the testcase being run.
+10) skipTest
+
+Add "skipTest: <function>" to not run the test for more complex reasons. The function is passed
+one argument, the connection object.
+
*/
// constants
@@ -5945,6 +5950,10 @@ var authCommandsLib = {
testname: "aggregate_$backupCursor",
command: {aggregate: 1, cursor: {}, pipeline: [{$backupCursor: {}}]},
skipSharded: true,
+ // Only enterprise knows of this aggregation stage.
+ skipTest:
+ (conn) =>
+ !conn.getDB("admin").runCommand({buildInfo: 1}).modules.includes("enterprise"),
testcases: [{
runOnDb: adminDbName,
roles: roles_hostManager,
@@ -5988,6 +5997,9 @@ var authCommandsLib = {
runOneTest: function(conn, t, impls) {
jsTest.log("Running test: " + t.testname);
+ if (t.skipTest && t.skipTest(conn)) {
+ return [];
+ }
// some tests shouldn't run in a sharded environment
if (t.skipSharded && this.isMongos(conn)) {
return [];