Skip to content

Commit

Permalink
Remove runbook URL validation bypass W/A (#2993)
Browse files Browse the repository at this point in the history
This should not be used.
Instead, we should get monitoring review on the alert design, which will in turn help merging the runbook.

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
Co-authored-by: Alex Kalenyuk <akalenyu@redhat.com>
  • Loading branch information
kubevirt-bot and akalenyu committed Nov 19, 2023
1 parent 89b8276 commit ecaafd2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@ const (
metricPollingTimeout = 5 * time.Minute
)

var excludedFromRunbookURLValidation = map[string]struct{}{
// https://github.com/kubevirt/monitoring/pull/201
"CDIMultipleDefaultVirtStorageClasses": {},
}

var _ = Describe("[Destructive] Monitoring Tests", func() {
f := framework.NewFramework("monitoring-test")

Expand Down Expand Up @@ -436,9 +431,6 @@ func checkRequiredAnnotations(rule promv1.Rule) {
ExpectWithOffset(1, rule.Annotations).To(HaveKeyWithValue("runbook_url", HaveSuffix(rule.Alert)),
"%s runbook is not equal to alert name", rule.Alert)

if _, excluded := excludedFromRunbookURLValidation[rule.Alert]; excluded {
return
}
resp, err := http.Head(rule.Annotations["runbook_url"])
ExpectWithOffset(1, err).ToNot(HaveOccurred(), fmt.Sprintf("%s runbook is not available", rule.Alert))
ExpectWithOffset(1, resp.StatusCode).Should(Equal(http.StatusOK), fmt.Sprintf("%s runbook is not available", rule.Alert))
Expand Down

0 comments on commit ecaafd2

Please sign in to comment.