diff options
author | Ben Caimano <ben.caimano@mongodb.com> | 2019-11-11 16:52:48 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-11 16:52:48 +0000 |
commit | 1180b6edf68c8104594941551cb60ed6749aad01 (patch) | |
tree | 33de934d53c19288093742793854e198cdbff37c | |
parent | f8868f95e1a6ba84bc26ec6d556923bf343141fe (diff) | |
download | mongo-1180b6edf68c8104594941551cb60ed6749aad01.tar.gz |
SERVER-44319 Skip keyfile check in replica_sets/auth1.js on windows
-rw-r--r-- | jstests/replsets/auth1.js | 31 |
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. |