Add MCM modprobe webhook tests (OCP-62605, OCP-62606, OCP-62607)#1337
Add MCM modprobe webhook tests (OCP-62605, OCP-62606, OCP-62607)#1337ItzikEzra-rh wants to merge 1 commit intorh-ecosystem-edge:mainfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 34 minutes and 27 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughTest file receives additions to webhook validation tests, including three new test cases covering scenarios with moduleName/rawArgs conflicts, missing rawArgs validation, and invalid module loader container specifications during updates. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 the current code and only fix it if needed.
Inline comments:
In `@tests/hw-accel/kmm/mcm/tests/webhook-test.go`:
- Around line 246-304: After creating the ManagedClusterModule via
NewManagedClusterModuleBuilder(...).Create() and assigning it to mcm,
immediately register cleanup with e.g. DeferCleanup(func() { _, _ = mcm.Delete()
}) (or the appropriate Ginkgo DeferCleanup helper) so the MCM is always removed
even if subsequent Expect calls fail; then remove the manual Delete call at the
end of the spec (the mcm.Delete() block) to avoid double-deletion.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: cbf0a512-0be9-40df-af4f-387f6284fa6f
📒 Files selected for processing (1)
tests/hw-accel/kmm/mcm/tests/webhook-test.go
Add three webhook validation tests for ManagedClusterModule that mirror existing Module-side tests: - OCP-62605: update valid MCM with invalid spec (mirrors OCP-62598) - OCP-62606: rawArgs required when moduleName unset (mirrors OCP-62599) - OCP-62607: moduleName vs rawArgs mutual exclusion (mirrors OCP-62600)
17a1ecd to
05f1959
Compare
Summary
Test plan
mcm-webhooklabel filter on cluster — all 7 tests passSummary by CodeRabbit