Skip to content

Commit af4c956

Browse files
test: make host more portable
Docker container localhost resolve fails to connect test suites to test Tarantool instances. Part of #164, #198
1 parent 9a32866 commit af4c956

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: test/suites/lib/tarantool_server.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def check_port(port, rais=True):
2121
try:
22-
sock = socket.create_connection(("localhost", port))
22+
sock = socket.create_connection(("0.0.0.0", port))
2323
except socket.error:
2424
return True
2525
sock.close()
@@ -103,7 +103,7 @@ def _admin(self, port):
103103
raise ValueError("Bad port number: '%s'" % port)
104104
if hasattr(self, 'admin'):
105105
del self.admin
106-
self.admin = TarantoolAdmin('localhost', port)
106+
self.admin = TarantoolAdmin('0.0.0.0', port)
107107

108108
@property
109109
def log_des(self):
@@ -147,7 +147,7 @@ def __init__(self,
147147
self.args['primary'] = self._socket.name
148148
self.args['admin'] = find_port()
149149
else:
150-
self.host = 'localhost'
150+
self.host = '0.0.0.0'
151151
self.args = {}
152152
self._socket = None
153153
self.args['primary'] = find_port()
@@ -208,7 +208,7 @@ def wait_until_started(self):
208208

209209
while True:
210210
try:
211-
temp = TarantoolAdmin('localhost', self.args['admin'])
211+
temp = TarantoolAdmin('0.0.0.0', self.args['admin'])
212212
while True:
213213
ans = temp('box.info.status')[0]
214214
if ans in ('running', 'hot_standby', 'orphan') or ans.startswith('replica'):

0 commit comments

Comments
 (0)