summaryrefslogtreecommitdiff
path: root/jstests/ssl/ssl_options.js
diff options
context:
space:
mode:
authorJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:17:50 -0500
committerJonathan Abrahams <jonathan@mongodb.com>2016-03-09 12:18:14 -0500
commit4ae691e8edc87d0e3cfb633bb91c328426be007b (patch)
tree52079a593f54382ca13a2e741633eab1b6271893 /jstests/ssl/ssl_options.js
parenta025d43f3ce2efc1fb1282a718f5d286fa0a4dc1 (diff)
downloadmongo-4ae691e8edc87d0e3cfb633bb91c328426be007b.tar.gz
SERVER-22468 Format JS code with approved style in jstests/
Diffstat (limited to 'jstests/ssl/ssl_options.js')
-rw-r--r--jstests/ssl/ssl_options.js21
1 files changed, 13 insertions, 8 deletions
diff --git a/jstests/ssl/ssl_options.js b/jstests/ssl/ssl_options.js
index 1881114b482..571f854851b 100644
--- a/jstests/ssl/ssl_options.js
+++ b/jstests/ssl/ssl_options.js
@@ -2,11 +2,13 @@ var baseName = "jstests_ssl_ssl_options";
jsTest.log("Testing censorship of ssl options");
-var mongodConfig = { sslPEMKeyFile : "jstests/libs/password_protected.pem",
- sslMode : "requireSSL",
- sslPEMKeyPassword : "qwerty",
- sslClusterPassword : "qwerty",
- sslCAFile: "jstests/libs/ca.pem"};
+var mongodConfig = {
+ sslPEMKeyFile: "jstests/libs/password_protected.pem",
+ sslMode: "requireSSL",
+ sslPEMKeyPassword: "qwerty",
+ sslClusterPassword: "qwerty",
+ sslCAFile: "jstests/libs/ca.pem"
+};
var mongodSource = MongoRunner.runMongod(mongodConfig);
var getCmdLineOptsResult = mongodSource.adminCommand("getCmdLineOpts");
@@ -15,7 +17,8 @@ var i;
var isPassword = false;
for (i = 0; i < getCmdLineOptsResult.argv.length; i++) {
if (isPassword) {
- assert.eq(getCmdLineOptsResult.argv[i], "<password>",
+ assert.eq(getCmdLineOptsResult.argv[i],
+ "<password>",
"Password not properly censored: " + tojson(getCmdLineOptsResult));
isPassword = false;
continue;
@@ -26,9 +29,11 @@ for (i = 0; i < getCmdLineOptsResult.argv.length; i++) {
isPassword = true;
}
}
-assert.eq(getCmdLineOptsResult.parsed.net.ssl.PEMKeyPassword, "<password>",
+assert.eq(getCmdLineOptsResult.parsed.net.ssl.PEMKeyPassword,
+ "<password>",
"Password not properly censored: " + tojson(getCmdLineOptsResult));
-assert.eq(getCmdLineOptsResult.parsed.net.ssl.clusterPassword, "<password>",
+assert.eq(getCmdLineOptsResult.parsed.net.ssl.clusterPassword,
+ "<password>",
"Password not properly censored: " + tojson(getCmdLineOptsResult));
MongoRunner.stopMongod(mongodSource.port);