Skip to content

Commit

Permalink
Use hostname instead of hardcoded IPv4 loopback
Browse files Browse the repository at this point in the history
  • Loading branch information
uglide committed Oct 22, 2024
1 parent cdb15ce commit 78f595a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_asyncio/test_cwe_404.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def remap(address):
port = cluster_port + i
remapped = remap_base + i
forward_addr = hostname, port
proxy = DelayProxy(addr=("127.0.0.1", remapped), redis_addr=forward_addr)
proxy = DelayProxy(addr=(hostname, remapped), redis_addr=forward_addr)
proxies.append(proxy)

def all_clear():
Expand All @@ -233,7 +233,7 @@ def set_delay(delay: float):
await stack.enter_async_context(p)

r = RedisCluster.from_url(
f"redis://127.0.0.1:{remap_base}", address_remap=remap
f"redis://{hostname}:{remap_base}", address_remap=remap
)
try:
await r.initialize()
Expand Down

0 comments on commit 78f595a

Please sign in to comment.