summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Marks <gabriel.marks@mongodb.com>2024-05-08 21:56:25 -0400
committerMongoDB Bot <mongo-bot@mongodb.com>2024-05-22 05:30:54 +0000
commit73b6bac821f09fa7d59c4ec9f4636880f3408c2e (patch)
tree4938b20e25b8bf4eb1efcbb3c5fbc3d83bf7e4b6
parent589790e186a5e6401496008b9405590634fe7663 (diff)
SERVER-90248 Include _id field in audit config parameter (#21979)
GitOrigin-RevId: ff4c8029f5224d72c06c33be0ca1c81ffb8ea97b
-rw-r--r--jstests/core/cluster_parameter_commands.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/jstests/core/cluster_parameter_commands.js b/jstests/core/cluster_parameter_commands.js
index b426c0a75e1..0360078d996 100644
--- a/jstests/core/cluster_parameter_commands.js
+++ b/jstests/core/cluster_parameter_commands.js
@@ -8,6 +8,8 @@
// not_allowed_with_signed_security_token,
// # Transactions aborted upon fcv upgrade or downgrade; cluster parameters use internal txns.
// uses_transactions,
+// # SERVER-90248 fixed in 8.1
+// requires_fcv_81
// ]
import {
@@ -91,3 +93,17 @@ assert.commandFailed(conn.getDB("config").clusterParameters.insert({
foo: 'bar',
clusterParameterTime: {"$timestamp": {t: 0, i: 0}}
}));
+
+// Assert that the results of getClusterParameter: '*' match the expected format, and that they are
+// consistent with individual gets.
+{
+ const allParameters =
+ assert.commandWorked(adminDB.runCommand({getClusterParameter: '*'})).clusterParameters;
+ jsTest.log(allParameters);
+ for (const param of allParameters) {
+ assert(param.hasOwnProperty("_id"),
+ 'Entry in {getClusterParameter: "*"} result is missing _id key:\n' + tojson(param));
+ const name = param["_id"];
+ checkGetClusterParameterMatch(conn, name, param);
+ }
+}