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:
@@ -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")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user