chore: refactor e2e test diagnostic#1144
Conversation
📝 WalkthroughWalkthroughThe PR updates e2e failure diagnostics in the framework and test callsites. Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/e2e/uiplugin_cluster_health_analyzer_test.go`:
- Around line 34-40: Register the UIPlugin and namespace failure diagnostics
before the first potentially failing assertion in the test so a create failure
still captures them: in the test that calls resetMonitoringUIPlugin and
f.K8sClient.Create, move f.DumpOnFailure(t, f.DebugUIPlugin(plugin.Name)) ahead
of the create/assertion, and add failure dumping for prometheusRuleNamespace as
well since the later PrometheusRule setup and wait checks depend on it. Keep the
existing uiPluginInstallNS dump, but ensure both namespaces and the plugin dump
are registered early enough to cover all failure paths in this test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 8fb8f16a-552e-4378-b48e-08856be3bc7d
📒 Files selected for processing (10)
test/e2e/framework/framework.gotest/e2e/framework/uiplugin.gotest/e2e/monitoring_stack_controller_test.gotest/e2e/observability_installer_test.gotest/e2e/operator_metrics_test.gotest/e2e/po_admission_webhook_test.gotest/e2e/prometheus_operator_test.gotest/e2e/thanos_querier_controller_test.gotest/e2e/uiplugin_cluster_health_analyzer_test.gotest/e2e/uiplugin_test.go
9a23f8c to
0d9726c
Compare
danielmellado
left a comment
There was a problem hiding this comment.
LGTM, just some minor cosmetic nits
|
|
||
| const ( | ||
| // DashboardsPluginName is the required name for the Dashboards Plugin resource. | ||
| DashboardsPluginName = "dashboards" |
There was a problem hiding this comment.
nit: DashboardsPluginName uses a PluginName suffix while all the other constants use just Name (DistributedTracingName, TroubleshootingPanelName, MonitoringName, LoggingName). Could you rename this to DashboardsName for consistency?
There was a problem hiding this comment.
good catch, I'd probably go with the PluginName suffix for all as it's more explanatory.
0d9726c to
8e5b262
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/e2e/uiplugin_cluster_health_analyzer_test.go`:
- Line 91: Add the missing exported MonitoringName constant in the
pkg/apis/uiplugin/v1alpha1 package, or update the test’s uiv1.MonitoringName
reference to the existing declared identifier. Ensure the Name field in the e2e
test resolves to a valid monitoring plugin name and the package type-checks
successfully.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 76be4179-8028-4837-ac1e-f93e1684f0b2
📒 Files selected for processing (11)
pkg/apis/uiplugin/v1alpha1/types.gotest/e2e/framework/framework.gotest/e2e/framework/uiplugin.gotest/e2e/monitoring_stack_controller_test.gotest/e2e/observability_installer_test.gotest/e2e/operator_metrics_test.gotest/e2e/po_admission_webhook_test.gotest/e2e/prometheus_operator_test.gotest/e2e/thanos_querier_controller_test.gotest/e2e/uiplugin_cluster_health_analyzer_test.gotest/e2e/uiplugin_test.go
🚧 Files skipped from review as they are similar to previous changes (9)
- test/e2e/operator_metrics_test.go
- test/e2e/framework/uiplugin.go
- test/e2e/prometheus_operator_test.go
- test/e2e/monitoring_stack_controller_test.go
- test/e2e/thanos_querier_controller_test.go
- test/e2e/po_admission_webhook_test.go
- test/e2e/framework/framework.go
- test/e2e/uiplugin_test.go
- pkg/apis/uiplugin/v1alpha1/types.go
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
8e5b262 to
ba54eb1
Compare
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: danielmellado, simonpasquier The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Follow-up of #1115