fix: the search schedule logs its state when it changes, so an idle pass says why (M502 #5521)
release / govulncheck (push) Successful in 22s
release / web (push) Successful in 1m16s
release / go (push) Successful in 1m36s
release / integration (push) Successful in 4m53s
release / android (push) Successful in 4m54s
release / Build signed APK (releases and dev) (push) Successful in 5m4s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 09:30:26 -04:00
co-authored by Claude Opus 5.5
parent 7f1fe57935
commit 77081f1cef
2 changed files with 41 additions and 4 deletions
+17
View File
@@ -194,3 +194,20 @@ func TestGrabs_OneLivePerWant_Integration(t *testing.T) {
t.Errorf("live = %+v %v %v", live, ok, err)
}
}
func TestReport_StateNamesWhyAPassWasQuiet(t *testing.T) {
for _, c := range []struct {
rep Report
want string
}{
{Report{Off: true}, "off"},
{Report{Unconfigured: true}, "unconfigured"},
{Report{Error: "boom"}, "failed"},
{Report{}, "idle"},
{Report{Looked: 2, Grabbed: 1}, "searched"},
} {
if got := c.rep.state(); got != c.want {
t.Errorf("%+v: state = %q, want %q", c.rep, got, c.want)
}
}
}