summaryrefslogtreecommitdiff
path: root/jstests/auth/localhostAuthBypass.js
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-05-28 17:55:12 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-05-28 17:55:12 -0400
commit6dcdd23dd37ef12c87e71cf59ef01cd82432efe0 (patch)
treec8cfb5acb62c80f375bc37e7d4350382deea6a37 /jstests/auth/localhostAuthBypass.js
parentd4ac5673ea3f6cef4ce9dbcec90e31813997a528 (diff)
downloadmongo-6dcdd23dd37ef12c87e71cf59ef01cd82432efe0.tar.gz
SERVER-23971 Clang-Format code
Diffstat (limited to 'jstests/auth/localhostAuthBypass.js')
-rw-r--r--jstests/auth/localhostAuthBypass.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/jstests/auth/localhostAuthBypass.js b/jstests/auth/localhostAuthBypass.js
index 6cb315650ef..cd56e3bc160 100644
--- a/jstests/auth/localhostAuthBypass.js
+++ b/jstests/auth/localhostAuthBypass.js
@@ -79,17 +79,13 @@ var assertCannotRunCommands = function(mongo) {
{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);
@@ -167,8 +163,8 @@ var runNonlocalTest = function(host) {
assertCannotRunCommands(mongo);
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});
});
assert.throws(function() {
mongo.getDB("$external")