summaryrefslogtreecommitdiff
path: root/src/mongo/shell/replsettest.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/shell/replsettest.js')
-rw-r--r--src/mongo/shell/replsettest.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/shell/replsettest.js b/src/mongo/shell/replsettest.js
index df1009e0d66..565fd3fb7b5 100644
--- a/src/mongo/shell/replsettest.js
+++ b/src/mongo/shell/replsettest.js
@@ -279,7 +279,8 @@ var ReplSetTest = function(opts) {
"/" + node.name);
}
- if (status.members[i].name == node.host || status.members[i].name == node.name) {
+ if (status.members[i].name.toLowerCase() == node.host.toLowerCase() ||
+ status.members[i].name.toLowerCase() == node.name.toLowerCase()) {
for (var j = 0; j < states.length; j++) {
if (printStatus) {
print("Status -- " + " current state: " + status.members[i][ind] +
@@ -2597,7 +2598,7 @@ var ReplSetTest = function(opts) {
print('Starting new replica set ' + self.name);
self.useHostName = opts.useHostName == undefined ? true : opts.useHostName;
- self.host = self.useHostName ? (opts.host || getHostName()) : 'localhost';
+ self.host = (self.useHostName ? (opts.host || getHostName()) : 'localhost').toLowerCase();
self.oplogSize = opts.oplogSize || 40;
self.useSeedList = opts.useSeedList || false;
self.keyFile = opts.keyFile;
@@ -2693,7 +2694,7 @@ var ReplSetTest = function(opts) {
self.ports = existingNodes.map(node => node.split(':')[1]);
self.nodes = existingNodes.map(node => new Mongo(node));
self.waitForKeys = false;
- self.host = existingNodes[0].split(':')[0];
+ self.host = existingNodes[0].split(':')[0].toLowerCase();
self.name = conf._id;
}