diff --git a/tests/pkg/tests/observability_alert_test.go b/tests/pkg/tests/observability_alert_test.go index 1505703c9..5fb6cbd93 100644 --- a/tests/pkg/tests/observability_alert_test.go +++ b/tests/pkg/tests/observability_alert_test.go @@ -192,6 +192,10 @@ var _ = Describe("Observability:", func() { }, EventuallyTimeoutMinute*5, EventuallyIntervalSecond*5).Should(Succeed()) }) + // TODO(subbarao): Re-enable slack integration test once issue mentioned in + // https://github.com/stolostron/multicluster-observability-operator/pull/1112 & + // https://github.com/stolostron/multicluster-observability-operator/pull/1258 + // is addressed. // It("[P2][Sev2][observability][Stable] Should modify the SECRET: alertmanager-config (alert/g0)", func() { // By("Editing the secret, we should be able to add the third partying tools integrations") // secret := utils.CreateCustomAlertConfigYaml(testOptions.HubCluster.BaseDomain) diff --git a/tests/pkg/utils/mco_deploy.go b/tests/pkg/utils/mco_deploy.go index e451dfb6b..2d4b156ce 100644 --- a/tests/pkg/utils/mco_deploy.go +++ b/tests/pkg/utils/mco_deploy.go @@ -5,7 +5,6 @@ package utils import ( "context" - b64 "encoding/base64" "encoding/json" "fmt" "io/ioutil" @@ -869,51 +868,3 @@ func UninstallMCO(opt TestOptions) error { return nil } - -func CreateCustomAlertConfigYaml(baseDomain string) []byte { - global := fmt.Sprintf(`global: - resolve_timeout: 5m -route: - receiver: default-receiver - routes: - - match: - alertname: Watchdog - receiver: default-receiver - group_by: ['alertname', 'cluster'] - group_wait: 5s - group_interval: 5s - repeat_interval: 2m -receivers: - - name: default-receiver - slack_configs: - - api_url: https://hooks.slack.com/services/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 - channel: team-observability-test - footer: | - {{ .CommonLabels.cluster }} - mrkdwn_in: - - text - title: '[{{ .Status | toUpper }}] {{ .CommonLabels.alertname }} ({{ .CommonLabels.severity }})' - text: |- - {{ range .Alerts }} - *Alerts:* {{ .Annotations.summary }} - *Description:* {{ .Annotations.description }} - *Details:* - {{ range .Labels.SortedPairs }} • *{{ .Name }}:* {{ .Value }} - {{ end }} - {{ end }} - title_link: https://multicloud-console.apps.%s/grafana/explore?orgId=1&left=["now-1h","now","Observatorium",{"expr":"ALERTS{alertname=\"{{ .CommonLabels.alertname }}\"}","context":"explore"},{"mode":"Metrics"},{"ui":[true,true,true,"none"]}] -`, baseDomain) - encodedGlobal := b64.StdEncoding.EncodeToString([]byte(global)) - - instance := fmt.Sprintf(`kind: Secret -apiVersion: v1 -metadata: - name: alertmanager-config - namespace: open-cluster-management-observability -data: - alertmanager.yaml: >- - %s -`, encodedGlobal) - - return []byte(instance) -}