summaryrefslogtreecommitdiff
path: root/jstests/serverless/disabled_cluster_parameters_serverless.js
blob: f59349f7bb6a7aab844251fd370026f7612b6d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * Checks that set/getClusterParameter omit test-only parameters when enableTestCommands
 * is false.
 *
 * @tags: [
 *   does_not_support_stepdowns,
 *   requires_replication,
 *   requires_fcv_62,
 *   serverless
 *  ]
 */
(function() {
'use strict';

load('jstests/libs/cluster_server_parameter_utils.js');

// Verifies that test-only parameters are disabled and excluded when enableTestCommands is false.
TestData.enableTestCommands = false;
const rst = new ReplSetTest({
    nodes: 3,
});
rst.startSet({setParameter: {multitenancySupport: true, featureFlagRequireTenantID: true}});
rst.initiate();

// Setup the necessary logging level for the test.
setupReplicaSet(rst);

// Assert that turning off enableTestCommands prevents test-only cluster server parameters
// from being directly set/retrieved and filters them from the output of
// getClusterParameter: '*' with and without a tenantId.
testDisabledClusterParameters(rst);
testDisabledClusterParameters(rst, ObjectId());
rst.stopSet();
}());