Skip to content

Commit

Permalink
Changed test host/ip settings for registry to avoid accidental ipv6 u…
Browse files Browse the repository at this point in the history
…sage.
  • Loading branch information
comrumino committed Jan 11, 2024
1 parent bd0e4d0 commit 1b071da
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,16 @@ def test_listing(self):

class TestTcpRegistry(BaseRegistryTest, unittest.TestCase):
def _get_server(self):
return TCPRegistryServer(pruning_timeout=PRUNING_TIMEOUT, allow_listing=True)
return TCPRegistryServer(host="127.0.0.1", pruning_timeout=PRUNING_TIMEOUT, allow_listing=True)

def _get_client(self):
return TCPRegistryClient("localhost")
return TCPRegistryClient(ip="127.0.0.1")


class TestUdpRegistry(BaseRegistryTest, unittest.TestCase):
""" May fail due to iptables/packet-drops. """
def _get_server(self):
return UDPRegistryServer(pruning_timeout=PRUNING_TIMEOUT, allow_listing=True)
return UDPRegistryServer(host="0.0.0.0", pruning_timeout=PRUNING_TIMEOUT, allow_listing=True)

def _get_client(self):
return UDPRegistryClient()
Expand Down

0 comments on commit 1b071da

Please sign in to comment.