# HG changeset patch # User Durham Goode # Date 1465335330 25200 # Node ID 945700dac23713ee2e2971781bebdd70eb158d5a # Parent 3c4fbf59e503d3812eb923e2b85a0121cc71657e tests: use hostname instead of localhost The test_push_command test was failing on our machines because the machines are ipv6 but expose ipv4 on the 127.0.0.1 loopback interface. This caused the svnserve process to listen via ipv4, but the connecting process would attempt to connect on ipv6 and fail. Using the hostname causes it to listen using the primary network interface, which matches the interface that is used when the connecting client resolves the hostname. So the test now passes. diff --git a/tests/test_push_command.py b/tests/test_push_command.py --- a/tests/test_push_command.py +++ b/tests/test_push_command.py @@ -138,7 +138,7 @@ class PushTests(test_util.TestBase): open(os.path.join(repo_path, 'conf', 'svnserve.conf'), 'w').write('[general]\nanon-access=write\n[sasl]\n') self.port = random.randint(socket.IPPORT_USERRESERVED, 65535) - self.host = 'localhost' + self.host = socket.gethostname() args = ['svnserve', '--daemon', '--foreground', '--listen-port=%d' % self.port, '--listen-host=%s' % self.host,