From 9266b724243428fe549aa19e934812eb3c14f017 Mon Sep 17 00:00:00 2001 From: emilylange Date: Sat, 17 May 2025 16:23:18 +0200 Subject: [PATCH] nixosTests.curl-impersonate: skip failing test We use a NixOS VM test to execute the upstream tests of curl-impersonate because they require networking which cannot be mocked easily in the sandbox. Of those upstream tests, test_http2_headers spawns nghttpd2, makes request against it and then tries to parse the logs it emits. The last step, the parsing of the logs, it extremely fragile and version dependent. The version of nghttp2 that we carry in nixpkgs is newer than the one curl-impersonate expects and happens to emit a different log format. So to fix the remaining test suite of curl-impersonate, we simply skip test_http2_headers. --- nixos/tests/curl-impersonate.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nixos/tests/curl-impersonate.nix b/nixos/tests/curl-impersonate.nix index 0846caeec6cb..28e741a2e19f 100644 --- a/nixos/tests/curl-impersonate.nix +++ b/nixos/tests/curl-impersonate.nix @@ -19,6 +19,9 @@ We do that by creating a trusted CA and issuing a cert that includes all of the test domains as subject-alternative names and then spoofs the hostnames in /etc/hosts. + - We started skipping the test_http2_headers test due to log format differences + between the nghttpd2 version in nixpkgs and the outdated one curl-impersonate + uses upstream for its tests. */ import ./make-test-python.nix ( @@ -125,7 +128,7 @@ import ./make-test-python.nix ( # Run tests cd tests - pytest . --install-dir ../usr --capture-interface eth1 + pytest . --install-dir ../usr --capture-interface eth1 --exitfirst -k 'not test_http2_headers' ''; in {