HYPERFLEET-1183 - test: Updating e2e tests to remove double coverage …#129
HYPERFLEET-1183 - test: Updating e2e tests to remove double coverage …#129ma-hill wants to merge 2 commits into
Conversation
|
[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 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughChannel and version CRUD lifecycle e2e suites are reclassified from Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 10 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (10 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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 `@e2e/channel/crud_lifecycle.go`:
- Around line 90-105: The test has a race condition where the static label value
"channel-lifecycle" used in both the PatchChannel call and the ListChannels
label selector can conflict with parallel test runs, causing the HaveLen(1)
assertion on line 103 to fail nondeterministically. Replace the hardcoded label
value "channel-lifecycle" with a unique, test-specific identifier (such as one
generated using a UUID or timestamp) in both the labels map passed to
PatchChannel and in the label selector query passed to ListChannels. This
ensures each test run uses isolated label values that won't interfere with
parallel executions.
🪄 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: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: 0ae38443-e613-405b-99ac-60036d224c95
📒 Files selected for processing (4)
e2e/channel/crud_lifecycle.goe2e/version/crud_lifecycle.goe2e/version/filtering.goe2e/version/uniqueness.go
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
openshift-hyperfleet/architecture(manual)openshift-hyperfleet/hyperfleet-api(manual)openshift-hyperfleet/hyperfleet-sentinel(manual)openshift-hyperfleet/hyperfleet-adapter(manual)openshift-hyperfleet/hyperfleet-broker(manual)
💤 Files with no reviewable changes (2)
- e2e/version/filtering.go
- e2e/version/uniqueness.go
Summary
Removes duplicate test coverage for version and channel filtering and uniqueness constraints. The tests in hyperfleet-api cover the cases that the
filtering.goanduniqueness.gotests were doing, making these tests redundant. Also since the Versions and Channels don't have adapters, the e2e tests are now thinner and only have a simple CRUD lifecycle for versions and channels. The additional testing is at the API layer.HYPERFLEET-1183
Changes
e2e/version/filtering.go(110 lines) — filtering byspec.is_defaultandspec.enabledis already validated in the CRUD lifecycle test's PATCH/LIST verificatione2e/version/uniqueness.go(100 lines) — duplicate name constraints are enforced by the API and covered by integration testse2e/version/crud_lifecycle.gothat validates label updates and filters the result via LIST with a label selectore2e/channel/crud_lifecycle.gowith the same verification patternlabels.Tier1tolabels.Tier0since they now cover the baseline CRUD + filtering pathNotes
In conjunction with the change here: openshift-hyperfleet/hyperfleet-api#225
The removed tests were originally written to validate spec-level filtering and uniqueness constraints in isolation, but these behaviors are implicitly tested whenever PATCH and LIST operations succeed in the CRUD tests. The new PATCH label assertions explicitly verify that filtering works as expected, making the standalone files unnecessary.
Test Plan
make test-allpassesmake lintpasses