-
Notifications
You must be signed in to change notification settings - Fork 23
Coverage around bz#1649961 #281
Comments
Some time back, devs requested to increase the coverage around roles and filters. Now bz components have been assigned so I'm leaving this up to component owner. However, having one test case where if "you create a custom role with some filters, it should be available and usable after upgrade" would be helpful here IMO.
Since the fix is in foreman-maintain that identify inconsistent roles and ask for auto recovery then I think we should cover this scenario at foreman-maintain level. what do you think @ntkathole @jameerpathan111 |
sure, will add coverage around it in Testfm |
@Mirzal, Does that conversation solves your problem ? |
It would be nice to have some coverage around bz#1649961. Let's discuss how we can approach the problem. I'm willing to create PR after discussion, but I will need some code pointers.
Key facts:
foreman-maintain upgrade run
, it means there is a bug somewhere.Approach 1
Basic scenario, where we enter some roles, upgrade Satellite and verify that roles are intact.
If we don't have much coverage around roles and filters, this is good idea anyway. But it is very unlikely to catch this specific issue in the future.
Approach 2
Use/extend existing coverage around roles to catch filters that changed resources between versions.
This is good info to have, so if we don't gather it automatically, we should. But it can only guide further testing, not act as check on itself - most of resource changes are expected.
Approach 3
Use migration script to break Satellite between entering data and running
foreman-maintain
.It currently breaks
view_arf_reports
permission. I would probably want to randomize it a bit.What I dislike, though, is that fix for the issue applied in
foreman-maintain
targets environment created by this migration (dev didn't try to follow upgrade path). If we repeatedly break environment and runforeman-maintain
with fix targeted at this specific breakage, we won't discover ifforeman-maintain
is unable to handle slight variations of that bug. We will only catch case when fix inforeman-maintain
breaks - but is it even likely? And if we worry about it, wouldn't it be better to increase coverage inforeman-maintain
test suite?Thoughts, opinions and ideas are more than welcome.
The text was updated successfully, but these errors were encountered: