diff options
Diffstat (limited to 'jstests/ssl/mongo_uri_secondaries.js')
-rw-r--r-- | jstests/ssl/mongo_uri_secondaries.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/jstests/ssl/mongo_uri_secondaries.js b/jstests/ssl/mongo_uri_secondaries.js index 9512a3c23c3..90c58cc358a 100644 --- a/jstests/ssl/mongo_uri_secondaries.js +++ b/jstests/ssl/mongo_uri_secondaries.js @@ -67,16 +67,14 @@ 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(); |