test/extended: Ignore firing alerts when cluster version is skewed
When the cluster is skewed due to an upgrade being paused both
Prometheus and kubelets cause alerts to fire. For now disable this
test when operating in this mode.
@@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"fmt"
+ "os"
"regexp"
"strconv"
"strings"
@@ -204,14 +205,14 @@ var _ = g.Describe("[Feature:Prometheus][Conformance] Prometheus", func() {
})
})
g.It("should report less than two alerts in firing or pending state", func() {
+ if len(os.Getenv("TEST_UNSUPPORTED_ALLOW_VERSION_SKEW")) > 0 {
+ e2e.Skipf("Test is disabled to allow cluster components to have different versions, and skewed versions trigger multiple other alerts")
+ }
oc.SetupProject()
ns := oc.Namespace()
execPodName := e2e.CreateExecPodOrFail(oc.AdminKubeClient(), ns, "execpod", func(pod *v1.Pod) { pod.Spec.Containers[0].Image = "centos:7" })
defer func() { oc.AdminKubeClient().CoreV1().Pods(ns).Delete(execPodName, metav1.NewDeleteOptions(1)) }()
- // needed for cluster to settle and have metrics and alerts usable
- time.Sleep(5 * time.Minute)
-
tests := map[string][]metricTest{
// should be checking there is no more than 1 alerts firing.
// Checking for specific alert is done in "should have a Watchdog alert in firing state".
