From 78f595a7debb8d05f2a66cd31352b8c42881a1d2 Mon Sep 17 00:00:00 2001 From: Igor Malinovskiy Date: Tue, 22 Oct 2024 17:55:53 +0200 Subject: [PATCH] Use hostname instead of hardcoded IPv4 loopback --- tests/test_asyncio/test_cwe_404.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_asyncio/test_cwe_404.py b/tests/test_asyncio/test_cwe_404.py index e920a3fb98..677e165fc6 100644 --- a/tests/test_asyncio/test_cwe_404.py +++ b/tests/test_asyncio/test_cwe_404.py @@ -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(): @@ -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()