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")