Skip to content

Commit 3d18a98

Browse files
committed
test: replace hardcoded localhost with actual hostname
1 parent 4545655 commit 3d18a98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/io/postgrest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,16 @@ def run(
9595
with tempfile.TemporaryDirectory() as tmpdir:
9696
if port:
9797
env["PGRST_SERVER_PORT"] = str(port)
98-
env["PGRST_SERVER_HOST"] = host or "localhost"
99-
baseurl = f"http://localhost:{port}"
98+
env["PGRST_SERVER_HOST"] = hostname = host or "localhost"
99+
baseurl = f"http://{hostname}:{port}"
100100
else:
101101
socketfile = pathlib.Path(tmpdir) / "postgrest.sock"
102102
env["PGRST_SERVER_UNIX_SOCKET"] = str(socketfile)
103103
baseurl = "http+unix://" + urllib.parse.quote_plus(str(socketfile))
104104

105105
adminport = freeport(port)
106106
env["PGRST_ADMIN_SERVER_PORT"] = str(adminport)
107-
adminurl = f"http://localhost:{adminport}"
107+
adminurl = f"http://{hostname}:{adminport}"
108108

109109
command = [POSTGREST_BIN]
110110
env["HPCTIXFILE"] = hpctixfile()

0 commit comments

Comments
 (0)