0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-27 23:27:11 +01:00
mongodb/jstests/noPassthrough/javascript_options.js
Santiago Roche 876f66eb13 SERVER-92024: Only provide JS_GC_ZEAL setting for mongo server processes. (#24954)
GitOrigin-RevId: 88dd3ef2b4325ca332b8e7e6180f1e8f9c7534ea
2024-09-06 19:58:23 +00:00

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);