summaryrefslogtreecommitdiff
path: root/jstests/sharding/auth2.js
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:42:24 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-26 18:42:24 -0400
commitc1a45ebbb0530e3d0201321d725527f1eb83ffce (patch)
treef523079dc5ded3052eefbdcaae424b7502df5b25 /jstests/sharding/auth2.js
parentc9599d8610c3da0b7c3da65667aff821063cf5b9 (diff)
downloadmongo-c1a45ebbb0530e3d0201321d725527f1eb83ffce.tar.gz
Apply formatting per `clang-format-7.0.1`
Diffstat (limited to 'jstests/sharding/auth2.js')
-rw-r--r--jstests/sharding/auth2.js40
1 files changed, 18 insertions, 22 deletions
diff --git a/jstests/sharding/auth2.js b/jstests/sharding/auth2.js
index f3ac5caf1c7..d1d6cb20156 100644
--- a/jstests/sharding/auth2.js
+++ b/jstests/sharding/auth2.js
@@ -1,30 +1,26 @@
(function() {
- 'use strict';
+'use strict';
- // TODO: Remove 'shardAsReplicaSet: false' when SERVER-32672 is fixed.
- var st = new ShardingTest({
- shards: 2,
- other: {
- chunkSize: 1,
- useHostname: true,
- keyFile: 'jstests/libs/key1',
- shardAsReplicaSet: false
- },
- });
+// TODO: Remove 'shardAsReplicaSet: false' when SERVER-32672 is fixed.
+var st = new ShardingTest({
+ shards: 2,
+ other:
+ {chunkSize: 1, useHostname: true, keyFile: 'jstests/libs/key1', shardAsReplicaSet: false},
+});
- var mongos = st.s;
- var adminDB = mongos.getDB('admin');
- var db = mongos.getDB('test');
+var mongos = st.s;
+var adminDB = mongos.getDB('admin');
+var db = mongos.getDB('test');
- adminDB.createUser({user: 'admin', pwd: 'password', roles: jsTest.adminUserRoles});
+adminDB.createUser({user: 'admin', pwd: 'password', roles: jsTest.adminUserRoles});
- jsTestLog("Add user was successful");
+jsTestLog("Add user was successful");
- // Test for SERVER-6549, make sure that repeatedly logging in always passes.
- for (var i = 0; i < 100; i++) {
- adminDB = new Mongo(mongos.host).getDB('admin');
- assert(adminDB.auth('admin', 'password'), "Auth failed on attempt #: " + i);
- }
+// Test for SERVER-6549, make sure that repeatedly logging in always passes.
+for (var i = 0; i < 100; i++) {
+ adminDB = new Mongo(mongos.host).getDB('admin');
+ assert(adminDB.auth('admin', 'password'), "Auth failed on attempt #: " + i);
+}
- st.stop();
+st.stop();
})();