summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2023-03-14 16:34:58 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-03-15 14:19:40 +0000
commitb39c58a5326680ed06616359f69e654fdaf3b2ac (patch)
tree1bebab32b135f8ddc0cdd1339803318e9529cbd3 /jstests
parent971a3e0082b6469cade1a7e4e706bfe2545cce98 (diff)
downloadmongo-b39c58a5326680ed06616359f69e654fdaf3b2ac.tar.gz
SERVER-74151 Create a new reads tags command for QE tags
Diffstat (limited to 'jstests')
-rw-r--r--jstests/auth/lib/commands_lib.js24
-rw-r--r--jstests/core/views/views_all_commands.js1
-rw-r--r--jstests/replsets/all_commands_downgrading_to_upgraded.js1
-rw-r--r--jstests/replsets/db_reads_while_recovering_all_commands.js1
-rw-r--r--jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js1
-rw-r--r--jstests/sharding/database_versioning_all_commands.js20
-rw-r--r--jstests/sharding/libs/last_lts_mongos_commands.js1
-rw-r--r--jstests/sharding/read_write_concern_defaults_application.js17
-rw-r--r--jstests/sharding/safe_secondary_reads_drop_recreate.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js1
-rw-r--r--jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js1
11 files changed, 67 insertions, 2 deletions
diff --git a/jstests/auth/lib/commands_lib.js b/jstests/auth/lib/commands_lib.js
index fd98f8ae941..fb848312724 100644
--- a/jstests/auth/lib/commands_lib.js
+++ b/jstests/auth/lib/commands_lib.js
@@ -4703,6 +4703,26 @@ export const authCommandsLib = {
]
},
{
+ testname: "getQueryableEncryptionCountInfo",
+ command: {
+ getQueryableEncryptionCountInfo: "foo",
+ tokens: [
+ {tokens: [{"s": BinData(0, "lUBO7Mov5Sb+c/D4cJ9whhhw/+PZFLCk/AQU2+BpumQ=")}]},
+ ],
+ "forInsert": true,
+ },
+ skipTest: (conn) => {
+ return !TestData.setParameters.featureFlagFLE2ProtocolVersion2;
+ },
+ testcases: [
+ {
+ runOnDb: adminDbName,
+ roles: {__system: 1},
+ privileges: [{resource: {cluster: true}, actions: ["internal"]}],
+ },
+ ]
+ },
+ {
testname: "getShardMap",
command: {getShardMap: "x"},
testcases: [
@@ -5503,7 +5523,7 @@ export const authCommandsLib = {
// Only enterprise knows of this command.
skipTest:
(conn) => {
- return !getBuildInfo().modules.includes("enterprise")
+ return !getBuildInfo().modules.includes("enterprise")
|| !TestData.setParameters.featureFlagOIDC;
},
testcases: [
@@ -5521,7 +5541,7 @@ export const authCommandsLib = {
// Only enterprise knows of this command.
skipTest:
(conn) => {
- return !getBuildInfo().modules.includes("enterprise")
+ return !getBuildInfo().modules.includes("enterprise")
|| !TestData.setParameters.featureFlagOIDC;
},
testcases: [
diff --git a/jstests/core/views/views_all_commands.js b/jstests/core/views/views_all_commands.js
index 78fac584871..7bee4ddc463 100644
--- a/jstests/core/views/views_all_commands.js
+++ b/jstests/core/views/views_all_commands.js
@@ -447,6 +447,7 @@ let viewsCommandTests = {
}
},
getParameter: {skip: isUnrelated},
+ getQueryableEncryptionCountInfo: {skip: isAnInternalCommand},
getShardMap: {skip: isUnrelated},
getShardVersion: {
command: {getShardVersion: "test.view"},
diff --git a/jstests/replsets/all_commands_downgrading_to_upgraded.js b/jstests/replsets/all_commands_downgrading_to_upgraded.js
index dc78e5fe04f..a545fa48e1a 100644
--- a/jstests/replsets/all_commands_downgrading_to_upgraded.js
+++ b/jstests/replsets/all_commands_downgrading_to_upgraded.js
@@ -699,6 +699,7 @@ const allCommands = {
// },
},
getParameter: {isAdminCommand: true, command: {getParameter: 1, logLevel: 1}},
+ getQueryableEncryptionCountInfo: {skip: isAnInternalCommand},
getShardMap: {
// TODO SERVER-69753: Unskip this command when we can test with sharded clusters.
skip: isNotImplementedYet,
diff --git a/jstests/replsets/db_reads_while_recovering_all_commands.js b/jstests/replsets/db_reads_while_recovering_all_commands.js
index ac5a56c42df..19f99f60cc4 100644
--- a/jstests/replsets/db_reads_while_recovering_all_commands.js
+++ b/jstests/replsets/db_reads_while_recovering_all_commands.js
@@ -273,6 +273,7 @@ const allCommands = {
expectFailure: true,
expectedErrorCode: ErrorCodes.NotPrimaryOrSecondary
},
+ getQueryableEncryptionCountInfo: {skip: isPrimaryOnly},
getParameter: {skip: isNotAUserDataRead},
getShardMap: {skip: isNotAUserDataRead},
getShardVersion: {skip: isPrimaryOnly},
diff --git a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js
index 1a8837c09d5..73777834b7a 100644
--- a/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js
+++ b/jstests/replsets/tenant_migration_concurrent_writes_on_donor_util.js
@@ -531,6 +531,7 @@ export const TenantMigrationConcurrentWriteUtil = {
getLog: {skip: isNotRunOnUserDatabase},
getMore: {skip: isNotWriteCommand},
getParameter: {skip: isNotRunOnUserDatabase},
+ getQueryableEncryptionCountInfo: {skip: isNotWriteCommand},
getShardMap: {skip: isNotRunOnUserDatabase},
getShardVersion: {skip: isNotRunOnUserDatabase},
getnonce: {skip: "removed in v6.3"},
diff --git a/jstests/sharding/database_versioning_all_commands.js b/jstests/sharding/database_versioning_all_commands.js
index 3dd7b0c371f..950b3db6ee9 100644
--- a/jstests/sharding/database_versioning_all_commands.js
+++ b/jstests/sharding/database_versioning_all_commands.js
@@ -509,6 +509,26 @@ let testCases = {
getLog: {skip: "executes locally on mongos (not sent to any remote node)"},
getMore: {skip: "requires a previously established cursor"},
getParameter: {skip: "executes locally on mongos (not sent to any remote node)"},
+ getQueryableEncryptionCountInfo: {
+ // TODO SERVER-69563 - Enable this test once the feature flag is enabled
+ skip: "requires feature flag"
+ // run: {
+ // sendsDbVersion: true,
+ // command: function(dbName, collName) {
+ // return {
+ // getQueryableEncryptionCountInfo: collName,
+ // tokens: [
+ // {
+ // tokens:
+ // [{"s": BinData(0,
+ // "lUBO7Mov5Sb+c/D4cJ9whhhw/+PZFLCk/AQU2+BpumQ=")}]
+ // },
+ // ],
+ // "forInsert": true
+ // };
+ // }
+ // }
+ },
getShardMap: {skip: "executes locally on mongos (not sent to any remote node)"},
getShardVersion: {skip: "executes locally on mongos (not sent to any remote node)"},
grantPrivilegesToRole: {skip: "always targets the config server"},
diff --git a/jstests/sharding/libs/last_lts_mongos_commands.js b/jstests/sharding/libs/last_lts_mongos_commands.js
index 22128722be2..b6e1dce31a5 100644
--- a/jstests/sharding/libs/last_lts_mongos_commands.js
+++ b/jstests/sharding/libs/last_lts_mongos_commands.js
@@ -31,6 +31,7 @@ const commandsAddedToMongosSinceLastLTS = [
"createSearchIndexes",
"dropSearchIndex",
"getClusterParameter",
+ "getQueryableEncryptionCountInfo",
"listSearchIndexes",
"mergeAllChunksOnShard",
"moveRange",
diff --git a/jstests/sharding/read_write_concern_defaults_application.js b/jstests/sharding/read_write_concern_defaults_application.js
index a4a61c16d23..baf4237a943 100644
--- a/jstests/sharding/read_write_concern_defaults_application.js
+++ b/jstests/sharding/read_write_concern_defaults_application.js
@@ -505,6 +505,23 @@ let testCases = {
getLog: {skip: "does not accept read or write concern"},
getMore: {skip: "does not accept read or write concern"},
getParameter: {skip: "does not accept read or write concern"},
+ getQueryableEncryptionCountInfo: {
+ // TODO SERVER-69563 - Enable this test once the feature flag is enabled
+ skip: "requires feature flag"
+ // setUp: function(conn) {
+ // assert.commandWorked(conn.getCollection(nss).insert({x: 1}, {writeConcern: {w: 1}}));
+ // },
+ // command: {
+ // getQueryableEncryptionCountInfo: coll,
+ // tokens: [
+ // {tokens: [{"s": BinData(0, "lUBO7Mov5Sb+c/D4cJ9whhhw/+PZFLCk/AQU2+BpumQ=")}]},
+ // ],
+ // "forInsert": true,
+ // },
+ // checkReadConcern: true,
+ // checkWriteConcern: false,
+ // useLogs: true,
+ },
getShardMap: {skip: "internal command"},
getShardVersion: {skip: "internal command"},
getnonce: {skip: "removed in v6.3"},
diff --git a/jstests/sharding/safe_secondary_reads_drop_recreate.js b/jstests/sharding/safe_secondary_reads_drop_recreate.js
index a1a390538a5..b0e45780b98 100644
--- a/jstests/sharding/safe_secondary_reads_drop_recreate.js
+++ b/jstests/sharding/safe_secondary_reads_drop_recreate.js
@@ -238,6 +238,7 @@ let testCases = {
getLog: {skip: "does not return user data"},
getMore: {skip: "shard version already established"},
getParameter: {skip: "does not return user data"},
+ getQueryableEncryptionCountInfo: {skip: "primary only"},
getShardMap: {skip: "does not return user data"},
getShardVersion: {skip: "primary only"},
godinsert: {skip: "for testing only"},
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
index 5df44ea6c4a..e88245b9000 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_suspend_range_deletion.js
@@ -258,6 +258,7 @@ let testCases = {
getLog: {skip: "does not return user data"},
getMore: {skip: "shard version already established"},
getParameter: {skip: "does not return user data"},
+ getQueryableEncryptionCountInfo: {skip: "primary only"},
getShardMap: {skip: "does not return user data"},
getShardVersion: {skip: "primary only"},
godinsert: {skip: "for testing only"},
diff --git a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
index 33393b14cfa..fea080bf2c4 100644
--- a/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
+++ b/jstests/sharding/safe_secondary_reads_single_migration_waitForDelete.js
@@ -247,6 +247,7 @@ let testCases = {
getLog: {skip: "does not return user data"},
getMore: {skip: "shard version already established"},
getParameter: {skip: "does not return user data"},
+ getQueryableEncryptionCountInfo: {skip: "primary only"},
getShardMap: {skip: "does not return user data"},
getShardVersion: {skip: "primary only"},
godinsert: {skip: "for testing only"},