vm tests: stop hive-squid binding journal to both a string and a function
This commit is contained in:
parent
49266e4410
commit
a401b0c8ef
1 changed files with 7 additions and 7 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue