diff options
Diffstat (limited to 'jstests')
-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 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(); |