summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2020-04-20 14:33:11 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-04-20 18:44:41 +0000
commit06f26fac35c7a3b82effbb9815ad9f7aedaf4dfb (patch)
tree64baed3ee8a6ea0bae09c62d016dd68eaf26242c /jstests
parent5943a22ad1a7bc8c8bc0a855087a9992ef4a2524 (diff)
downloadmongo-06f26fac35c7a3b82effbb9815ad9f7aedaf4dfb.tar.gz
SERVER-46633 Windows TLS implementation may declare hostname mismatch on unrelated error
Diffstat (limited to 'jstests')
-rw-r--r--jstests/ssl/mongo_uri_secondaries.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/jstests/ssl/mongo_uri_secondaries.js b/jstests/ssl/mongo_uri_secondaries.js
index 6970015cc12..a4ed1eae93c 100644
--- a/jstests/ssl/mongo_uri_secondaries.js
+++ b/jstests/ssl/mongo_uri_secondaries.js
@@ -61,16 +61,14 @@ const subShellCommandFormatter = function(replSet) {
return command;
};
-const subShellArgs = [
- "env",
- "SSL_CERT_FILE=jstests/libs/trusted-ca.pem",
- 'mongo',
- '--nodb',
- '--eval',
- subShellCommandFormatter(rst)
-];
+function runWithEnv(args, env) {
+ const pid = _startMongoProgram({args: args, env: env});
+ return waitProgram(pid);
+}
+
+const subShellArgs = ['mongo', '--nodb', '--eval', subShellCommandFormatter(rst)];
-const retVal = _runMongoProgram(...subShellArgs);
+const retVal = runWithEnv(subShellArgs, {"SSL_CERT_FILE": "jstests/libs/trusted-ca.pem"});
assert.eq(retVal, 0, 'mongo shell did not succeed with exit code 0');
rst.stopSet();