mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
21 lines
528 B
JavaScript
21 lines
528 B
JavaScript
// 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');
|
|
}
|
|
|
|
// Whitelisted
|
|
test('disabledSecureAllocatorDomains=foo', true);
|
|
|
|
// Not whitelisted
|
|
test('enableTestCommands=1', false);
|
|
|
|
// Unknown
|
|
test('theAnswerToTheQuestionOfLifeTheUniverseAndEverything=42', false);
|
|
})();
|