summaryrefslogtreecommitdiff
path: root/jstests/replsets/localhost1.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/replsets/localhost1.js')
-rw-r--r--jstests/replsets/localhost1.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/jstests/replsets/localhost1.js b/jstests/replsets/localhost1.js
index d44f9f6b2ba..27fa1bc6cf9 100644
--- a/jstests/replsets/localhost1.js
+++ b/jstests/replsets/localhost1.js
@@ -1,16 +1,16 @@
// Test ReplSet default initiate with localhost-only binding
(function() {
- 'use strict';
+'use strict';
- // Select localhost when binding to localhost
- const rt = new ReplSetTest({name: "rsLocal", nodes: 1});
- const primary = rt.startSet({bind_ip: "127.0.0.1"})[0];
- const db = primary.getDB('admin');
- const resp = assert.commandWorked(db.adminCommand({replSetInitiate: undefined}));
- assert(resp.me.startsWith('127.0.0.1'), tojson(resp.me) + " does not start with 127.0.0.1:");
+// Select localhost when binding to localhost
+const rt = new ReplSetTest({name: "rsLocal", nodes: 1});
+const primary = rt.startSet({bind_ip: "127.0.0.1"})[0];
+const db = primary.getDB('admin');
+const resp = assert.commandWorked(db.adminCommand({replSetInitiate: undefined}));
+assert(resp.me.startsWith('127.0.0.1'), tojson(resp.me) + " does not start with 127.0.0.1:");
- // Wait for the primary to complete its election before shutting down the set.
- assert.soon(() => db.runCommand({ismaster: 1}).ismaster);
- rt.stopSet();
+// Wait for the primary to complete its election before shutting down the set.
+assert.soon(() => db.runCommand({ismaster: 1}).ismaster);
+rt.stopSet();
})();