diff options
author | Sara Golemon <sara.golemon@mongodb.com> | 2020-06-17 16:16:27 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-18 13:14:35 +0000 |
commit | 89f797fe34c6dda8fa571f7d161d9871eba151a5 (patch) | |
tree | e4b2d08e66303146419a7a7d35874b36922e117c /jstests/auth | |
parent | f46630dd3ab6eb01eedcc6c07640571893888080 (diff) | |
download | mongo-89f797fe34c6dda8fa571f7d161d9871eba151a5.tar.gz |
SERVER-48921 Use localhost when checking localhost auth bypass
Diffstat (limited to 'jstests/auth')
-rw-r--r-- | jstests/auth/localhost_authbypass_state.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/jstests/auth/localhost_authbypass_state.js b/jstests/auth/localhost_authbypass_state.js index 7a8f5f6c8ee..8ee4b5ca389 100644 --- a/jstests/auth/localhost_authbypass_state.js +++ b/jstests/auth/localhost_authbypass_state.js @@ -110,11 +110,12 @@ const standaloneWC = { w: 1, j: true }; -let standalone = MongoRunner.runMongod({auth: ''}); +let standalone = MongoRunner.runMongod({auth: '', useHostName: false}); runTest('Standalone', {primary: standalone, wc: standaloneWC}, function() { const dbpath = standalone.dbpath; MongoRunner.stopMongod(standalone); - standalone = MongoRunner.runMongod({auth: '', restart: true, cleanData: false, dbpath: dbpath}); + standalone = MongoRunner.runMongod( + {auth: '', restart: true, cleanData: false, dbpath: dbpath, useHostName: false}); return {primary: standalone, wc: standaloneWC}; }); MongoRunner.stopMongod(standalone); @@ -125,8 +126,13 @@ const replsetWC = { w: replsetNodes, j: true }; -const replset = - new ReplSetTest({name: 'rs0', nodes: replsetNodes, nodeOptions: {auth: ''}, keyFile: keyfile}); +const replset = new ReplSetTest({ + name: 'rs0', + nodes: replsetNodes, + nodeOptions: {auth: ''}, + keyFile: keyfile, + useHostName: false, +}); replset.startSet(); replset.initiate(); replset.awaitSecondaryNodes(); |