diff --git a/app/vmalert/alerting_test.go b/app/vmalert/alerting_test.go index 61e39c371..d05305c90 100644 --- a/app/vmalert/alerting_test.go +++ b/app/vmalert/alerting_test.go @@ -866,8 +866,8 @@ func TestAlertingRule_Template(t *testing.T) { for hash, expAlert := range tc.expAlerts { gotAlert := tc.rule.alerts[hash] if gotAlert == nil { - t.Fatalf("alert %d is missing; labels: %v; annotations: %v", - hash, expAlert.Labels, expAlert.Annotations) + t.Fatalf("alert %d is missing; labels: %v; annotations: %v", hash, expAlert.Labels, expAlert.Annotations) + break } if !reflect.DeepEqual(expAlert.Annotations, gotAlert.Annotations) { t.Fatalf("expected to have annotations %#v; got %#v", expAlert.Annotations, gotAlert.Annotations)