mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-04 12:02:55 +00:00
test_pg_clients: fix test that reads from stdout (#6021)
## Problem `test_pg_clients` reads the actual result from a *.stdout file, https://github.com/neondatabase/neon/pull/5977 has added a header to such files, so `test_pg_clients` started to fail. ## Summary of changes - Use `capture_stdout` and compare the expected result with the output instead of *.stdout file content
This commit is contained in:
committed by
GitHub
parent
1d81e70d60
commit
e6b2f89fec
@@ -48,6 +48,6 @@ def test_pg_clients(test_output_dir: Path, remote_pg: RemotePostgres, client: st
|
||||
subprocess_capture(test_output_dir, build_cmd, check=True)
|
||||
|
||||
run_cmd = [docker_bin, "run", "--rm", "--env-file", env_file, image_tag]
|
||||
basepath, _, _ = subprocess_capture(test_output_dir, run_cmd, check=True)
|
||||
_, output, _ = subprocess_capture(test_output_dir, run_cmd, check=True, capture_stdout=True)
|
||||
|
||||
assert Path(f"{basepath}.stdout").read_text().strip() == "1"
|
||||
assert str(output).strip() == "1"
|
||||
|
||||
Reference in New Issue
Block a user