mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-27 23:27:11 +01:00
876f66eb13
GitOrigin-RevId: 88dd3ef2b4325ca332b8e7e6180f1e8f9c7534ea
36 lines
1.2 KiB
JavaScript
36 lines
1.2 KiB
JavaScript
/*
|
|
* @tags: [
|
|
* requires_scripting,
|
|
* ]
|
|
*/
|
|
import {
|
|
testGetCmdLineOptsMongod,
|
|
testGetCmdLineOptsMongos
|
|
} from "jstests/libs/command_line/test_parsed_options.js";
|
|
|
|
let expectedResult = {"parsed": {"security": {"javascriptEnabled": false}}};
|
|
testGetCmdLineOptsMongod({noscripting: ""}, expectedResult);
|
|
testGetCmdLineOptsMongos({noscripting: ""}, expectedResult);
|
|
|
|
expectedResult = {
|
|
"parsed": {
|
|
"config": "jstests/libs/config_files/disable_noscripting.ini",
|
|
"security": {"javascriptEnabled": true}
|
|
}
|
|
};
|
|
testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_noscripting.ini"},
|
|
expectedResult);
|
|
testGetCmdLineOptsMongos({config: "jstests/libs/config_files/disable_noscripting.ini"},
|
|
expectedResult);
|
|
|
|
expectedResult = {
|
|
"parsed": {
|
|
"config": "jstests/libs/config_files/enable_scripting.json",
|
|
"security": {"javascriptEnabled": true}
|
|
}
|
|
};
|
|
testGetCmdLineOptsMongod({config: "jstests/libs/config_files/enable_scripting.json"},
|
|
expectedResult);
|
|
testGetCmdLineOptsMongos({config: "jstests/libs/config_files/enable_scripting.json"},
|
|
expectedResult);
|