blob: 354a06b86cabcb57a7cd96995d2841a8ed62a8e5 (
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
|
(function() {
"use strict";
load('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);
}());
|