OBSINTA-1219: add e2e tests for UIPlugin incident detection#1038
OBSINTA-1219: add e2e tests for UIPlugin incident detection#1038DavidRajnoha wants to merge 1 commit intorhobs:mainfrom
Conversation
|
Hi @DavidRajnoha. Thanks for your PR. I'm waiting for a rhobs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
98bf576 to
89ac678
Compare
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: DavidRajnoha The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
89ac678 to
0768ae2
Compare
|
/ok-to-test |
|
/retest |
|
@DavidRajnoha: This pull request references OBSINTA-1219 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.22.0" version, but no target version was set. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
f427aa1 to
970ac8c
Compare
Validate that the Monitoring UIPlugin with ClusterHealthAnalyzer enabled deploys the health-analyzer and correctly processes alerts into incident metrics. The test creates a crashing pod, waits for the corresponding PrometheusRule alert to fire, then verifies the cluster_health_components_map metric is exposed with the expected labels. Also extends the framework's AssertPromQLResult with configurable timeout and poll interval options (AssertPromQLResultWithOptions). Made-with: Cursor
970ac8c to
90b891c
Compare
| deployName := "e2e-crasher-" + suffix | ||
|
|
||
| rule := newCrashLoopRule(t, ruleName, alertName, deployName) | ||
| err = f.K8sClient.Create(context.Background(), rule) |
There was a problem hiding this comment.
nit: you can use t.Context()
|
|
||
| monv1.AddToScheme(f.K8sClient.Scheme()) | ||
|
|
||
| plugin := newMonitoringUIPlugin(t) |
There was a problem hiding this comment.
Maybe it's enabled in the tests, but I think this requires the OpenShift feature gate to be enabled.
|
/hold |
Add end-to-end tests that validate the monitoring UIPlugin with cluster-health-analyzer: a deployment readiness check and a functional test that triggers a CrashLoopBackOff alert and verifies the cluster_health_components_map incident metric is produced.
Also introduce AssertPromQLResultWithOptions to allow callers to override the default poll interval and timeout, and generalize waitForDBUIPluginDeletion to waitForUIPluginDeletion.