test: skip terminating source namespaces - #1249
Conversation
Signed-off-by: Atif Ali <atali@redhat.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded a sequential OpenShift Ginkgo test. The test verifies that a terminating wildcard-matched source namespace does not block management of another matching namespace or successful Application synchronization. ChangesTerminating Source Namespace Handling
Estimated code review effort: 3 (Moderate) | ~25 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go`:
- Around line 97-99: In the sequential test cleanup, snapshot the original
argoCD.Spec.SourceNamespaces before the Update call at lines 97-99 and restore
it in AfterEach; likewise snapshot appProject.Spec.SourceNamespaces before the
change at lines 176-178 and restore it during cleanup, ensuring both shared
configurations are returned to their pre-test values.
🪄 Autofix
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: Pro Plus
Run ID: 11fe9a02-fd0f-42bf-af58-17c6b495898f
📒 Files selected for processing (1)
test/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
argoproj-labs/argocd-operator(manual)
| argocdFixture.Update(argoCD, func(ac *argov1beta1api.ArgoCD) { | ||
| ac.Spec.SourceNamespaces = []string{"src-1-132-*"} | ||
| }) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Restore all shared resource changes during cleanup.
AfterEach cleans created namespaces but does not restore shared ArgoCD and AppProject configuration. This leaks test state into later sequential specs.
test/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go#L97-L99: snapshot and restoreargoCD.Spec.SourceNamespaces.test/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go#L176-L178: snapshot and restoreappProject.Spec.SourceNamespaces.
📍 Affects 1 file
test/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go#L97-L99(this comment)test/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go#L176-L178
🤖 Prompt for 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.
In
`@test/openshift/e2e/ginkgo/sequential/1-132_validate_handle_terminating_source_namespaces_test.go`
around lines 97 - 99, In the sequential test cleanup, snapshot the original
argoCD.Spec.SourceNamespaces before the Update call at lines 97-99 and restore
it in AfterEach; likewise snapshot appProject.Spec.SourceNamespaces before the
change at lines 176-178 and restore it during cleanup, ensuring both shared
configurations are returned to their pre-test values.
Source: Path instructions
|
/retest |
|
/test v4.19-kuttl-sequential |
|
@aali309: The following tests failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
What type of PR is this?
/kind enhancement
What does this PR do / why we need it:
Direct copy/paste of the test in: argoproj-labs/argocd-operator#2292
Following: #1240 && #1247
Also see: https://redhat-internal.slack.com/archives/D07LM8HHZGC/p1786001038132709?thread_ts=1785330549.543099&cid=D07LM8HHZGC
Have you updated the necessary documentation?
Which issue(s) this PR fixes:
Fixes #?
Test acceptance criteria:
How to test changes / Special notes to the reviewer: