summaryrefslogtreecommitdiff
path: root/jstests/sharding/names.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/sharding/names.js')
-rw-r--r--jstests/sharding/names.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/jstests/sharding/names.js b/jstests/sharding/names.js
index 17e98f82b30..5b30dc436c4 100644
--- a/jstests/sharding/names.js
+++ b/jstests/sharding/names.js
@@ -1,6 +1,10 @@
// Test that having replica set names the same as the names of other shards works fine
+(function() {
-var st = new ShardingTest( name = "test", shards = 0, verbose = 2, mongos = 2, other = { rs : true } )
+var st = new ShardingTest({ name: "HostNames",
+ shards: 0,
+ mongos: 2,
+ other: { rs : true } });
var rsA = new ReplSetTest({ nodes : 2, name : "rsA" })
var rsB = new ReplSetTest({ nodes : 2, name : "rsB" })
@@ -41,4 +45,6 @@ assert.eq(2, config.shards.count(), "Error re-adding a shard");
assert.eq(rsB.getURL(), config.shards.findOne({_id:rsA.name})["host"], "Wrong host for shard rsA 3");
assert.eq(rsA.getURL(), config.shards.findOne({_id:rsB.name})["host"], "Wrong host for shard rsB 3");
-st.stop() \ No newline at end of file
+st.stop();
+
+})();