hub v0.162.0 (built, not deployed): no repeat mail after a restart for a known-down host or an already-reported stale restore test (R-1001); the Day-0 agent list leaves out packages without the felhom-agent file, a vouch of one is refused (R-1011); an absent tunnel reads 'none set up' (R-1070)
gates / gates (push) Successful in 7m20s

This commit is contained in:
admin committed 2026-10-19 20:27:01 +02:00
1 parent a28f162c66
commit 5f31da04bc
16 files changed
+443 -17

No files matched your search

+16
View File
@@ -272,3 +272,19 @@ func TestSystemPage_KernelCells(t *testing.T) {
t.Fatalf("an older agent: %+v %+v", d, step)
}
}
// R-1070: the agent's new `absent` tunnel state (no cloudflared container — no tunnel set up) reads as a plain fact,
// not as a warning; not_running stays red, an unknown state stays amber.
func TestSystemRows_R1070_AbsentTunnelIsNotAWarning(t *testing.T) {
lines := []osupdates.FleetLine{{HostID: "a", Tunnel: "absent"}, {HostID: "b", Tunnel: "not_running"}, {HostID: "c", Tunnel: "unknown"}}
rows := buildSystemRows(lines, nil, nil, time.Hour, time.Hour, time.Hour, time.Now())
if len(rows) != 3 {
t.Fatalf("rows: %d", len(rows))
}
if rows[0].Tunnel.Class != "" || rows[0].Tunnel.Text != "none set up" {
t.Errorf("absent: %+v, want a plain „none set up\"", rows[0].Tunnel)
}
if rows[1].Tunnel.Class != "bad" || rows[2].Tunnel.Class != "warn" {
t.Errorf("not_running %+v must stay bad, unknown %+v warn", rows[1].Tunnel, rows[2].Tunnel)
}
}