diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-09-01 16:19:57 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-09-09 13:14:48 -0400 |
commit | c15f4bb96d2ee86874582d45d1865e9358168e7e (patch) | |
tree | 92c788863ae91a8b9c5801e1d536d7ef1a02ec05 /jstests/sslSpecial | |
parent | f5e063d4785b0460ab41de8cc4b537e5e2151338 (diff) | |
download | mongo-c15f4bb96d2ee86874582d45d1865e9358168e7e.tar.gz |
SERVER-18272 Update jstests to use allocatePort() instead of hard coding ports
Diffstat (limited to 'jstests/sslSpecial')
-rw-r--r-- | jstests/sslSpecial/set_parameter_nossl.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/jstests/sslSpecial/set_parameter_nossl.js b/jstests/sslSpecial/set_parameter_nossl.js index 0b5e72dd4fb..280d47b6130 100644 --- a/jstests/sslSpecial/set_parameter_nossl.js +++ b/jstests/sslSpecial/set_parameter_nossl.js @@ -1,15 +1,12 @@ -// Test changing the --sslMode and --clusterAuthMode +// Test changing the --sslMode and --clusterAuthMode // parameters using setParameter -port = allocatePorts(1)[0]; - // setParameter should always fail since it // cannot be used to transition from disabled/keyFile modes function testTransition(newSSLMode, newClusterAuthMode) { // If no parameters are given sslMode defaults to disabled - var conn = MongoRunner.runMongod({port: port, - clusterAuthMode: "keyFile"}) - var adminDB = conn.getDB("admin"); + var conn = MongoRunner.runMongod({clusterAuthMode: "keyFile"}); + var adminDB = conn.getDB("admin"); var res = adminDB.runCommand({ "setParameter" : 1, "sslMode" : newSSLMode }); assert(!res["ok"]); @@ -17,10 +14,9 @@ function testTransition(newSSLMode, newClusterAuthMode) { var res = adminDB.runCommand({ "setParameter" : 1, "clusterAuthMode" : newClusterAuthMode }); assert(!res["ok"]); - MongoRunner.stopMongod(port); + MongoRunner.stopMongod(conn.port); } testTransition("allowSSL", "sendKeyFile"); testTransition("preferSSL", "sendX509"); testTransition("requireSSL", "x509"); - |