refactor: deduplicate host resolution logic and observations
Replaces the "API server listening on unix socket" with simpler "API server listening on " observation. This allows refactoring redundant code. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
committed by
Steve Chavez
parent
ef9ac61d9e
commit
41b6ebea58
+1
-1
@@ -1378,7 +1378,7 @@ def test_log_postgrest_host_and_port(host, defaultenv):
|
||||
output = postgrest.read_stdout(nlines=10)
|
||||
|
||||
if is_unix:
|
||||
re.match(r'API server listening on unix socket "/tmp/.*\.sock"', output[2])
|
||||
re.match(r'API server listening on "/tmp/.*\.sock"', output[2])
|
||||
elif is_ipv6(host):
|
||||
assert f"API server listening on [{host}]:{port}" in output[2]
|
||||
else: # IPv4
|
||||
|
||||
Reference in New Issue
Block a user