From 2ff8330f90eacae37ad8d53da462a624c3d521de Mon Sep 17 00:00:00 2001 From: RealHinome Date: Mon, 15 Jun 2026 14:26:01 +0200 Subject: [PATCH] test(nix): fix race condition in portail-identity-aware-upstream Add node.wait_until_succeeds before running curl assertions to ensure the proxy has fully established its internal tunnel. Signed-off-by: RealHinome --- nix/tests/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/tests/default.nix b/nix/tests/default.nix index 0e86dfa..7418ef5 100644 --- a/nix/tests/default.nix +++ b/nix/tests/default.nix @@ -642,6 +642,12 @@ in "curl --fail --max-time 5 https://hello.corp.example.com/" ) + # Wait until the proxy has fully established its internal tunnel. + node.wait_until_succeeds( + "curl --fail --silent --output /dev/null --max-time 5 --proxy http://127.0.0.1:8080 https://hello.corp.example.com", + timeout=30 + ) + # Test HTTP CONNECT curl -> portail -(TLS)-> portail (hop) -> corp-server result = json.loads(node.succeed( "curl --fail --max-time 5 --proxy http://127.0.0.1:8080 https://hello.corp.example.com"