test(EC-1824): add acceptance tests for multi-arch volatile exceptions#3333
test(EC-1824): add acceptance tests for multi-arch volatile exceptions#3333robnester-rh wants to merge 2 commits into
Conversation
Add two acceptance test scenarios verifying that volatile config componentNames excludes work correctly with multi-arch expanded component names (e.g., "foo-sha256:<digest>-arm64"). The tests use --images with an ApplicationSnapshot file to set component names to the expanded format, validating the originalComponentName() wiring in Criteria.get() end-to-end. Scenario A: exclude matches when expanded name's base matches componentNames Scenario B: exclude does NOT match when base name differs resolves: EC-1824 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds an EC-1824 comment and two Gherkin scenarios that test whether ChangesMulti-arch volatile config matching
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
ReviewFindingsInfo
Previous runReviewFindingsLow
Info
|
| Then the exit status should be 0 | ||
| Then the output should match the snapshot | ||
|
|
||
| # Tests for EC-1824: multi-arch per-component volatile exceptions. |
There was a problem hiding this comment.
[info] test-adequacy
The tests validate originalComponentName() wiring by directly supplying component names in the expanded multi-arch format. This tests volatile config exclude matching in Criteria.get() without exercising the full imageIndexWorker expansion path. Unit tests in criteria_test.go cover originalComponentName() in isolation, and together the coverage is reasonable.
There was a problem hiding this comment.
nitchpick: to keep the comments neat maybe we don't need such detailed comments.
There was a problem hiding this comment.
Good point — trimmed it down to two lines in 9817ee4.
Codecov Report✅ All modified and coverable lines are covered by tests.
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
reference: EC-1824 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🤖 Finished Review · ✅ Success · Started 5:28 PM UTC · Completed 5:34 PM UTC |
| Then the exit status should be 0 | ||
| Then the output should match the snapshot | ||
|
|
||
| # EC-1824: verify volatile config componentNames excludes work with |
There was a problem hiding this comment.
[info] test-inadequate
The two scenarios provide good positive/negative coverage for multi-arch expanded component name matching. A potential additional edge case would test a component name containing a sha256-like substring that is NOT a multi-arch expanded name (e.g., without the sha256: prefix pattern), to verify originalComponentName() correctly identifies the expansion boundary rather than doing a simple prefix match.
PR Summary by Qodo
Add acceptance tests for multi-arch volatileConfig componentNames excludes
🧪 Tests🕐 20-40 MinutesWalkthroughs
User Description
Summary
componentNamesexcludes work with multi-arch expanded component namesoriginalComponentName()wiring inCriteria.get()end-to-end throughvalidate image--imageswith ApplicationSnapshot file to set component names to the expanded format (e.g.,foo-sha256:<digest>-arm64)Test plan
componentNames(exit 0)resolves: EC-1824
🤖 Generated with Claude Code
AI Description
Diagram
graph TD A["Acceptance scenarios"] --> B["ec validate image"] --> C["Load --images snapshot"] --> D["Expanded component name"] --> E["Criteria.get(): originalComponentName"] --> F{"Exclude matches componentNames?"} F -->|"yes"| G["Skip excluded checks"] --> H["Exit status"] F -->|"no"| I["Run failing rule"] --> HHigh-Level Assessment
The following are alternative approaches to this PR:
1. Add focused unit tests for component name normalization
2. Add a smaller integration test around Criteria.get() + volatile config parsing
Recommendation: Keep the acceptance tests as implemented because they validate the bug-prone end-to-end path (validate image + snapshot-provided expanded names + volatile excludes). If future failures become flaky/slow, consider complementing with a narrow unit test for name normalization to reduce reliance on full acceptance setup.
File Changes
Tests (1)