Watch
0
0
Fork
You've already forked hyperhive
0

full-setup vm test: match iris and spawn exactly in the agents-status check

The jq filter used contains(), which matches substrings per element, so an agent named spawn-two satisfied spawn. It now counts the exact names iris and spawn among the fresh agents that need a login.
This commit is contained in:
atlas 2026-11-10 01:26:25 +01:00 • committed by mara
commit 04a5133c1b

View file

@ -408,7 +408,7 @@ pkgs.testers.runNixOSTest (
settle( settle(
f"curl --fail --silent --unix-socket {SOCKET} {API}/api/agents/status " f"curl --fail --silent --unix-socket {SOCKET} {API}/api/agents/status "
"| jq -e '[.[] | select(.hive == \"" + HIVE + "\" and .freshness == \"fresh\" and .needs_login == true)" "| jq -e '[.[] | select(.hive == \"" + HIVE + "\" and .freshness == \"fresh\" and .needs_login == true)"
" | .name] | contains([\"iris\", \"spawn\"])'", " | .name] | map(select(. == \"iris\" or . == \"spawn\")) | unique | length == 2'",
2400, 2400,
["swarm-controller", "hive-c0re"], ["swarm-controller", "hive-c0re"],
) )