diff options
Diffstat (limited to 'jstests')
-rw-r--r-- | jstests/auth/auth1.js | 3 | ||||
-rw-r--r-- | jstests/auth/resource_pattern_matching.js | 14 | ||||
-rw-r--r-- | jstests/disk/repair4.js | 1 | ||||
-rw-r--r-- | jstests/httpinterface/httpinterface.js | 24 | ||||
-rw-r--r-- | jstests/httpinterface/network_options.js | 84 | ||||
-rw-r--r-- | jstests/libs/config_files/disable_httpinterface.ini | 1 | ||||
-rw-r--r-- | jstests/libs/config_files/disable_jsonp.ini | 1 | ||||
-rw-r--r-- | jstests/libs/config_files/disable_nohttpinterface.ini | 1 | ||||
-rw-r--r-- | jstests/libs/config_files/disable_rest_interface.json | 7 | ||||
-rw-r--r-- | jstests/libs/config_files/enable_httpinterface.json | 7 |
10 files changed, 6 insertions, 137 deletions
diff --git a/jstests/auth/auth1.js b/jstests/auth/auth1.js index 2d8eae737b4..d4ba3fe033d 100644 --- a/jstests/auth/auth1.js +++ b/jstests/auth/auth1.js @@ -5,8 +5,7 @@ function setupTest() { print("START auth1.js"); baseName = "jstests_auth_auth1"; - m = MongoRunner.runMongod( - {auth: "", nohttpinterface: "", bind_ip: "127.0.0.1", useHostname: false}); + m = MongoRunner.runMongod({auth: "", bind_ip: "127.0.0.1", useHostname: false}); return m; } diff --git a/jstests/auth/resource_pattern_matching.js b/jstests/auth/resource_pattern_matching.js index 0d9781efd4b..dd83b8bf273 100644 --- a/jstests/auth/resource_pattern_matching.js +++ b/jstests/auth/resource_pattern_matching.js @@ -228,12 +228,8 @@ MongoRunner.stopMongod(conn); print('--- done standalone node test ---'); print('--- replica set test ---'); -var rst = new ReplSetTest({ - name: 'testset', - nodes: 2, - nodeOptions: {'auth': null, 'httpinterface': null}, - keyFile: keyfile -}); +var rst = + new ReplSetTest({name: 'testset', nodes: 2, nodeOptions: {'auth': null}, keyFile: keyfile}); rst.startSet(); rst.initiate(); @@ -250,9 +246,9 @@ var st = new ShardingTest({ shard: 1, keyFile: keyfile, other: { - mongosOptions: {'auth': null, 'httpinterface': null}, - configOptions: {'auth': null, 'httpinterface': null}, - shardOptions: {'auth': null, 'httpinterface': null} + mongosOptions: {'auth': null}, + configOptions: {'auth': null}, + shardOptions: {'auth': null} } }); run_tests(st.s0.getDB('admin'), st.s1.getDB('admin')); diff --git a/jstests/disk/repair4.js b/jstests/disk/repair4.js index f5d73a4ae93..2fed96e3674 100644 --- a/jstests/disk/repair4.js +++ b/jstests/disk/repair4.js @@ -32,7 +32,6 @@ if (doIt) { smallfiles: "", dbpath: smallpath, repairpath: repairpath, - nohttpinterface: "", bind_ip: "127.0.0.1", }); diff --git a/jstests/httpinterface/httpinterface.js b/jstests/httpinterface/httpinterface.js deleted file mode 100644 index dc21422ff46..00000000000 --- a/jstests/httpinterface/httpinterface.js +++ /dev/null @@ -1,24 +0,0 @@ -// SERVER-9137 test that the httpinterface parameter enables the web interface -var conn = MongoRunner.runMongod({smallfiles: ""}); -var httpPort = conn.port + 1000; - -tryHttp = function() { - try { - var mongo = new Mongo('localhost:' + httpPort); - } catch (e) { - return false; - } - // if we managed to start and connect a new mongo then the web interface is working - return true; -}; - -assert.throws(function() { - assert.soon(tryHttp, "tryHttp failed, like we expected it to"); -}); - -MongoRunner.stopMongod(conn); - -conn = MongoRunner.runMongod({port: conn.port, smallfiles: "", httpinterface: ""}); -assert.soon(tryHttp, "the web interface should be running on " + httpPort); - -MongoRunner.stopMongod(conn); diff --git a/jstests/httpinterface/network_options.js b/jstests/httpinterface/network_options.js index ff5e453b4ec..f8efd6afb9f 100644 --- a/jstests/httpinterface/network_options.js +++ b/jstests/httpinterface/network_options.js @@ -31,39 +31,6 @@ expectedResult = { }; testGetCmdLineOptsMongod({}, expectedResult); -// HTTP Interface -jsTest.log("Testing \"httpinterface\" command line option"); -var expectedResult = {"parsed": {"net": {"http": {"enabled": true}}}}; -testGetCmdLineOptsMongod({httpinterface: ""}, expectedResult); - -jsTest.log("Testing \"nohttpinterface\" command line option"); -expectedResult = { - "parsed": {"net": {"http": {"enabled": false}}} -}; -testGetCmdLineOptsMongod({nohttpinterface: ""}, expectedResult); - -jsTest.log("Testing implicit enabling of http interface with \"jsonp\" command line option"); -expectedResult = { - "parsed": {"net": {"http": {"JSONPEnabled": true, "enabled": true}}} -}; -testGetCmdLineOptsMongod({jsonp: ""}, expectedResult); - -jsTest.log("Testing implicit enabling of http interface with \"rest\" command line option"); -expectedResult = { - "parsed": {"net": {"http": {"RESTInterfaceEnabled": true, "enabled": true}}} -}; -testGetCmdLineOptsMongod({rest: ""}, expectedResult); - -jsTest.log("Testing \"net.http.enabled\" config file option"); -expectedResult = { - "parsed": { - "config": "jstests/libs/config_files/enable_httpinterface.json", - "net": {"http": {"enabled": true}} - } -}; -testGetCmdLineOptsMongod({config: "jstests/libs/config_files/enable_httpinterface.json"}, - expectedResult); - jsTest.log("Testing with no explicit network option setting"); expectedResult = { "parsed": {"net": {}} @@ -91,37 +58,6 @@ if (!_isWindows()) { testGetCmdLineOptsMongod({}, expectedResult); } -// Test that we preserve switches explicitly set to false in config files. See SERVER-13439. -jsTest.log("Testing explicitly disabling \"net.http.RESTInterfaceEnabled\" config file option"); -expectedResult = { - "parsed": { - "config": "jstests/libs/config_files/disable_rest_interface.json", - "net": {"http": {"RESTInterfaceEnabled": false}} - } -}; -testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_rest_interface.json"}, - expectedResult); - -jsTest.log("Testing explicitly disabling \"net.http.JSONPEnabled\" config file option on mongoD"); -expectedResult = { - "parsed": { - "config": "jstests/libs/config_files/disable_jsonp.json", - "net": {"http": {"JSONPEnabled": false}} - } -}; -testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_jsonp.json"}, expectedResult); - -// jsonp on mongos is legacy and not supported in json/yaml config files since this interface is not -// well defined. See SERVER-11707 for an example. -jsTest.log("Testing explicitly disabling \"jsonp\" config file option on mongoS"); -expectedResult = { - "parsed": { - "config": "jstests/libs/config_files/disable_jsonp.ini", - "net": {"http": {"JSONPEnabled": false}} - } -}; -testGetCmdLineOptsMongos({config: "jstests/libs/config_files/disable_jsonp.ini"}, expectedResult); - jsTest.log("Testing explicitly disabled \"objcheck\" config file option"); expectedResult = { "parsed": { @@ -142,26 +78,6 @@ expectedResult = { testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_noobjcheck.ini"}, expectedResult); -jsTest.log("Testing explicitly disabled \"httpinterface\" config file option"); -expectedResult = { - "parsed": { - "config": "jstests/libs/config_files/disable_httpinterface.ini", - "net": {"http": {"enabled": false}} - } -}; -testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_httpinterface.ini"}, - expectedResult); - -jsTest.log("Testing explicitly disabled \"nohttpinterface\" config file option"); -expectedResult = { - "parsed": { - "config": "jstests/libs/config_files/disable_nohttpinterface.ini", - "net": {"http": {"enabled": true}} - } -}; -testGetCmdLineOptsMongod({config: "jstests/libs/config_files/disable_nohttpinterface.ini"}, - expectedResult); - jsTest.log("Testing explicitly disabled \"ipv6\" config file option"); expectedResult = { "parsed": {"config": "jstests/libs/config_files/disable_ipv6.ini", "net": {"ipv6": false}} diff --git a/jstests/libs/config_files/disable_httpinterface.ini b/jstests/libs/config_files/disable_httpinterface.ini deleted file mode 100644 index fc839a98a76..00000000000 --- a/jstests/libs/config_files/disable_httpinterface.ini +++ /dev/null @@ -1 +0,0 @@ -httpinterface=false diff --git a/jstests/libs/config_files/disable_jsonp.ini b/jstests/libs/config_files/disable_jsonp.ini deleted file mode 100644 index 82847f50b2b..00000000000 --- a/jstests/libs/config_files/disable_jsonp.ini +++ /dev/null @@ -1 +0,0 @@ -jsonp=false diff --git a/jstests/libs/config_files/disable_nohttpinterface.ini b/jstests/libs/config_files/disable_nohttpinterface.ini deleted file mode 100644 index 52c4958da6e..00000000000 --- a/jstests/libs/config_files/disable_nohttpinterface.ini +++ /dev/null @@ -1 +0,0 @@ -nohttpinterface=false diff --git a/jstests/libs/config_files/disable_rest_interface.json b/jstests/libs/config_files/disable_rest_interface.json deleted file mode 100644 index f9ad93a4f5d..00000000000 --- a/jstests/libs/config_files/disable_rest_interface.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "net" : { - "http" : { - "RESTInterfaceEnabled" : false - } - } -} diff --git a/jstests/libs/config_files/enable_httpinterface.json b/jstests/libs/config_files/enable_httpinterface.json deleted file mode 100644 index c87dabe125d..00000000000 --- a/jstests/libs/config_files/enable_httpinterface.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "net" : { - "http" : { - "enabled" : true - } - } -} |