summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/setshellparameter.js
blob: d1b50791cc035d0a1180d24271d7e97aacefc54e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test --setShellParameter CLI switch.

(function() {
'use strict';

function test(ssp, succeed) {
    const result = runMongoProgram('mongo', '--setShellParameter', ssp, '--nodb', '--eval', ';');
    assert.eq(
        0 == result, succeed, '--setShellParameter ' + ssp + 'worked/didn\'t-work unexpectedly');
}

// Allowlisted
test('disabledSecureAllocatorDomains=foo', true);

// Not allowlisted
test('enableTestCommands=1', false);

// Unknown
test('theAnswerToTheQuestionOfLifeTheUniverseAndEverything=42', false);
})();