feat: change behaviour

Do not return event with ok status on first
run of check. Will only return check result if
anything went wrong.
This commit is contained in:
2025-09-20 20:39:06 +03:00
parent 6b711756af
commit 214fda877e
2 changed files with 12 additions and 10 deletions

View File

@@ -145,15 +145,11 @@ func TestStartStop(t *testing.T) {
count := 0
for res := range out {
if res.Status != watchdog.StatusOK || res.Error != nil {
t.Errorf("incorrect status for check %s", res.Name)
}
for range out {
count++
}
if count != 2 {
if count != 0 {
t.Error("incorrect result count received from chan")
}