diff options
Diffstat (limited to 'jstests/replsets/localhostAuthBypass.js')
-rw-r--r-- | jstests/replsets/localhostAuthBypass.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/jstests/replsets/localhostAuthBypass.js b/jstests/replsets/localhostAuthBypass.js index 2b2332d258a..22a512f19d0 100644 --- a/jstests/replsets/localhostAuthBypass.js +++ b/jstests/replsets/localhostAuthBypass.js @@ -68,17 +68,13 @@ var assertCannotRunCommands = function(mongo, isPrimary) { {param: "userCacheInvalidationIntervalSecs", val: 300} ]; params.forEach(function(p) { - var cmd = { - setParameter: 1 - }; + var cmd = {setParameter: 1}; cmd[p.param] = p.val; assert.commandFailedWithCode( mongo.getDB("admin").runCommand(cmd), authorizeErrorCode, "setParameter: " + p.param); }); params.forEach(function(p) { - var cmd = { - getParameter: 1 - }; + var cmd = {getParameter: 1}; cmd[p.param] = 1; assert.commandFailedWithCode( mongo.getDB("admin").runCommand(cmd), authorizeErrorCode, "getParameter: " + p.param); @@ -221,8 +217,8 @@ var runNonlocalTest = function(ipAddr) { }); assert.throws(function() { - mongo.getDB("admin") - .createUser({user: username, pwd: password, roles: jsTest.adminUserRoles}); + mongo.getDB("admin").createUser( + {user: username, pwd: password, roles: jsTest.adminUserRoles}); }); shutdown(rs); |