summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-11-11 16:52:48 +0000
committerevergreen <evergreen@mongodb.com>2019-11-11 16:52:48 +0000
commit1180b6edf68c8104594941551cb60ed6749aad01 (patch)
tree33de934d53c19288093742793854e198cdbff37c
parentf8868f95e1a6ba84bc26ec6d556923bf343141fe (diff)
downloadmongo-1180b6edf68c8104594941551cb60ed6749aad01.tar.gz
SERVER-44319 Skip keyfile check in replica_sets/auth1.js on windows
-rw-r--r--jstests/replsets/auth1.js31
1 files changed, 16 insertions, 15 deletions
diff --git a/jstests/replsets/auth1.js b/jstests/replsets/auth1.js
index 9a9f36939b2..7a5685c6cfe 100644
--- a/jstests/replsets/auth1.js
+++ b/jstests/replsets/auth1.js
@@ -30,21 +30,22 @@ load("jstests/replsets/rslib.js");
MongoRunner.stopMongod(m);
- print("reset permissions");
- run("chmod", "644", key1_644);
-
- print("try starting mongod");
- m = runMongoProgram("mongod",
- "--keyFile",
- key1_644,
- "--port",
- port[0],
- "--dbpath",
- MongoRunner.dataPath + name);
-
- print("should fail with wrong permissions");
- assert.eq(
- m, _isWindows() ? 100 : 1, "mongod should exit w/ 1 (EXIT_FAILURE): permissions too open");
+ if (!_isWindows()) {
+ print("reset permissions");
+ run("chmod", "644", key1_644);
+
+ print("try starting mongod");
+ m = runMongoProgram("mongod",
+ "--keyFile",
+ key1_644,
+ "--port",
+ port[0],
+ "--dbpath",
+ MongoRunner.dataPath + name);
+
+ print("should fail with wrong permissions");
+ assert.eq(m, 1, "mongod should exit w/ 1 (EXIT_FAILURE): permissions too open");
+ }
// Pre-populate the data directory for the first replica set node, to be started later, with
// a user's credentials.