From e6b2f89fecb2b9129a1d6b00ad370bf81bfc4177 Mon Sep 17 00:00:00 2001 From: Alexander Bayandin Date: Mon, 4 Dec 2023 11:18:41 +0000 Subject: [PATCH] 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 --- test_runner/pg_clients/test_pg_clients.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_runner/pg_clients/test_pg_clients.py b/test_runner/pg_clients/test_pg_clients.py index 8381eac946..3579c92b0c 100644 --- a/test_runner/pg_clients/test_pg_clients.py +++ b/test_runner/pg_clients/test_pg_clients.py @@ -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"