summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Caimano <ben.caimano@mongodb.com>2019-11-11 17:00:02 +0000
committerevergreen <evergreen@mongodb.com>2019-11-11 17:00:02 +0000
commite9d6bf00473292b6169fbdecb85e52a1fe1f808a (patch)
treea63b1166f5f9ae86d2e58bf688a6b4cae168c323
parentdc6ef5a552519da68c7c880a3a33ad315b32c466 (diff)
downloadmongo-e9d6bf00473292b6169fbdecb85e52a1fe1f808a.tar.gz
SERVER-44319 Skip keyfile check in replica_sets/auth1.js on windows
-rw-r--r--jstests/replsets/auth1.js26
1 files changed, 16 insertions, 10 deletions
diff --git a/jstests/replsets/auth1.js b/jstests/replsets/auth1.js
index 42dc2638c28..0b9e21754f2 100644
--- a/jstests/replsets/auth1.js
+++ b/jstests/replsets/auth1.js
@@ -30,16 +30,22 @@ assert.eq(m.getDB("local").auth("__system", ""), 0);
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.