diff --git a/tests/metrics_test.go b/tests/metrics_test.go index 84f7af05e..cc4341107 100644 --- a/tests/metrics_test.go +++ b/tests/metrics_test.go @@ -213,8 +213,8 @@ var _ = Describe("Metrics", func() { "%s summary is missing or empty", rule.Alert) Expect(rule.Annotations).To(HaveKey("runbook_url"), "%s runbook_url is missing", rule.Alert) - Expect(rule.Annotations).To(HaveKeyWithValue("runbook_url", HaveSuffix(rule.Alert)), - "%s runbook is not equal to alert name", rule.Alert) + Expect(rule.Annotations).To(HaveKeyWithValue("runbook_url", ContainSubstring(rule.Alert)), + "%s runbook_url doesn't include alert name", rule.Alert) resp, err := http.Head(rule.Annotations["runbook_url"]) Expect(err).ToNot(HaveOccurred(), fmt.Sprintf("%s runbook is not available", rule.Alert)) Expect(resp.StatusCode).Should(Equal(http.StatusOK), fmt.Sprintf("%s runbook is not available", rule.Alert))