-
Notifications
You must be signed in to change notification settings - Fork 86
Ensure that spec.nonAdmin and spec.vmFileRestore enable/disable have basic tests #2042
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: oadp-dev
Are you sure you want to change the base?
Conversation
WalkthroughDocumentation example added for running E2E tests with TEST_FILTER unset. Two new boolean configuration fields (EnableVMFR and EnableNonAdmin) added to the test specification, with corresponding E2E tests for enabling and disabling these features in DPA deployments. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tests/e2e/dpa_deployment_suite_test.go (2)
389-410: NonAdmin enable/disable test could assert feature state, not just reconciliationThis test correctly exercises the enable→disable flow using
CreateOrUpdateandIsReconciledTrue(), consistent with the rest of the suite. If you want it to catch regressions specific to the NonAdmin feature (not just general reconciliation), consider additionally reading back the DPA resource and asserting that.Spec.NonAdmin.Enable(or the presence/absence of NonAdmin-related behavior/resources) actually flips between enabled and disabled.
412-433: VMFileRestore enable/disable test mirrors NonAdmin; consider asserting VMFR-specific stateSimilar to the NonAdmin test, this covers the VMFileRestore enable→disable transition and ensures the operator still reconciles successfully. To tighten coverage on the VMFR feature itself, consider also verifying that
.Spec.VMFileRestore.Enable(or VMFR-related resources) reflect the enabled vs disabled state after each reconciliation, not just thatIsReconciledTrue()returns true.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (2)
docs/developer/testing/TESTING.md(1 hunks)tests/e2e/dpa_deployment_suite_test.go(3 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
docs/developer/testing/TESTING.mdtests/e2e/dpa_deployment_suite_test.go
🧬 Code graph analysis (1)
tests/e2e/dpa_deployment_suite_test.go (2)
api/v1alpha1/dataprotectionapplication_types.go (2)
NonAdmin(695-733)VMFileRestore(736-745)pkg/client/client.go (1)
CreateOrUpdate(39-46)
🔇 Additional comments (2)
docs/developer/testing/TESTING.md (1)
103-107: VMFileRestore E2E invocation example is clear and usefulThe added note and
make test-e2e TEST_FILTER="" ...example make it much easier to run the VMFileRestore configuration test explicitly when TEST_FILTER would otherwise interfere. No issues from a docs/readability standpoint.tests/e2e/dpa_deployment_suite_test.go (1)
21-38: NonAdmin/VMFileRestore flags are correctly mapped into the DPA specThe new
EnableNonAdminandEnableVMFRbooleans onTestDPASpec, and their use increateTestDPASpecto setNonAdmin.EnableandVMFileRestore.Enableviaptr.To(true), align with the API types and existing patterns (e.g., NodeAgent/Restic). Leaving these sub-structs nil when the flags are false is a reasonable way to represent the disabled state in the CR.Also applies to: 134-143
|
/retest |
|
/retest |
1 similar comment
|
/retest |
|
/retest |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kaovilai, shubham-pampattiwar, weshayutin 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 |
|
@weshayutin: The following test 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. |
Why the changes were made
because the lord knows we NEED tests
How to test the changes made
make test-e2e TEST_FILTER="" GINKGO_ARGS="--focus='Should enable and disable VMFileRestore'"