From a401b0c8ef2cfe591d1f280710e13dcfb7484fc9 Mon Sep 17 00:00:00 2001 From: atlas Date: Fri, 13 Nov 2026 10:40:28 +0100 Subject: [PATCH] vm tests: stop hive-squid binding journal to both a string and a function --- nix/vm-tests/hive-squid.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nix/vm-tests/hive-squid.nix b/nix/vm-tests/hive-squid.nix index c591020d6..426bb1737 100644 --- a/nix/vm-tests/hive-squid.nix +++ b/nix/vm-tests/hive-squid.nix @@ -643,14 +643,14 @@ pkgs.testers.runNixOSTest { proxy.succeed("mv -f /run/credstore/kept /run/credstore/hive-squid.selfcheck") with checked("squid's access log reaches the journal under squid.service, with the user"): - journal = proxy.succeed("journalctl -u squid.service -o cat") - assert re.search(r"192\.168\.1\.3 TCP_TUNNEL/200 .* CONNECT forge\.t\.local:443 atlas ", journal), journal - assert re.search(r"192\.168\.1\.3 TCP_TUNNEL/200 .* CONNECT other\.t\.local:443 uma ", journal), journal - assert re.search(r"192\.168\.1\.3 TCP_DENIED/407 .* CONNECT forge\.t\.local:443 - ", journal), journal - assert re.search(r"192\.168\.1\.3 TCP_DENIED/403 .* CONNECT other\.t\.local:443 atlas ", journal), journal - assert re.search(r"192\.168\.1\.3 TCP_DENIED/403 .* CONNECT loop\.t\.local:443 ", journal), journal + access_log = proxy.succeed("journalctl -u squid.service -o cat") + assert re.search(r"192\.168\.1\.3 TCP_TUNNEL/200 .* CONNECT forge\.t\.local:443 atlas ", access_log), access_log + assert re.search(r"192\.168\.1\.3 TCP_TUNNEL/200 .* CONNECT other\.t\.local:443 uma ", access_log), access_log + assert re.search(r"192\.168\.1\.3 TCP_DENIED/407 .* CONNECT forge\.t\.local:443 - ", access_log), access_log + assert re.search(r"192\.168\.1\.3 TCP_DENIED/403 .* CONNECT other\.t\.local:443 atlas ", access_log), access_log + assert re.search(r"192\.168\.1\.3 TCP_DENIED/403 .* CONNECT loop\.t\.local:443 ", access_log), access_log # Exporter scrapes are cachemgr requests and stay out of the log. - assert "squid-internal-mgr" not in journal, journal + assert "squid-internal-mgr" not in access_log, access_log with checked("the exporter serves squid's counters on loopback"): metrics = proxy.succeed("curl -sf http://127.0.0.1:9301/metrics")