o/snapstate: fix validation set checking when removing components#16670
o/snapstate: fix validation set checking when removing components#16670Rnfudge02 wants to merge 2 commits intocanonical:masterfrom
Conversation
|
Fri Feb 27 14:16:19 UTC 2026 Failures:Preparing:
Executing:
Restoring:
Skipped tests from snapd-testing-skip
|
andrewphelpsj
left a comment
There was a problem hiding this comment.
Thanks, could you add a test for this scenario: "snap required, component not required, component removal should be allowed"
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16670 +/- ##
==========================================
- Coverage 77.61% 77.53% -0.08%
==========================================
Files 1348 1359 +11
Lines 187068 187317 +249
Branches 2446 2446
==========================================
+ Hits 145185 145232 +47
- Misses 33109 33306 +197
- Partials 8774 8779 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
olivercalder
left a comment
There was a problem hiding this comment.
Nice, LGTM, thanks! Good to have a test which checks that a component which is not included in the validation set can be removed. Maybe if there's a way to have a component included but not required, could be good to have a test that that can be removed too?
| "presence": "required", | ||
| "components": map[string]any{ | ||
| enforcedCompName: map[string]any{ | ||
| "presence": "required", |
There was a problem hiding this comment.
Would it be possible to have another component here for which presence is not required? And test that it can be removed?
There was a problem hiding this comment.
Yes, that is possible. Good idea.
andrewphelpsj
left a comment
There was a problem hiding this comment.
Thanks! Adding that other test case is a good idea.
fee526d to
d379395
Compare
No description provided.