diff --git a/app/vmalert/alerting_test.go b/app/vmalert/alerting_test.go index 9c779d7386..5f8f725588 100644 --- a/app/vmalert/alerting_test.go +++ b/app/vmalert/alerting_test.go @@ -872,6 +872,7 @@ func TestAlertingRule_Template(t *testing.T) { gotAlert := tc.rule.alerts[hash] if gotAlert == nil { 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)