Skip to content

Commit

Permalink
Merge pull request #1012 from kubevirt-bot/cherry-pick-1011-to-releas…
Browse files Browse the repository at this point in the history
…e-v0.20

[release-v0.20] Fix runbook_url test
  • Loading branch information
kubevirt-bot authored Jul 24, 2024
2 parents cf84347 + 6e8c201 commit 890a7ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 890a7ee

Please sign in to comment.