From 83ae6e2a47d89a02f107ddb1186cb2b3cb92122c Mon Sep 17 00:00:00 2001 From: Hongkai Liu Date: Tue, 24 Mar 2026 17:53:53 -0400 Subject: [PATCH] Allow for alerts to fire from an e2e test Sometimes, alerts are triggers to test a feature [1]. We allow for them to fire in CI with a specific prefix on the alert name to avoid overlapping with any alert from production. [1]. https://redhat.atlassian.net/browse/OTA-1813 --- .../testframework/legacytestframeworkmonitortests/alerts.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go b/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go index 17d4e2fb50b5..4ffa3af37dc6 100644 --- a/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go +++ b/pkg/monitortests/testframework/legacytestframeworkmonitortests/alerts.go @@ -243,6 +243,11 @@ func isSkippedAlert(alertName string) bool { return true } } + // The prefix is specific enough to avoid overlapping with any alert from Production. + // These alerts are used as triggers for an e2e test. + if strings.HasPrefix(alertName, "TestAlertFeatureE2ETest") { + return true + } return false }