Commit 7bc530d
committed
pkg/cvo/cvo_test: Firm up Test_gateApplicableToCurrentVersion checking
This code is from 519b466 (Bug 1978376: Add admin ack Upgradeable
condition gate, 2021-07-27, #633). But I'm about to move it, and
CodeRabbit complains about the unhandled "wantErr=true, but err==nil"
and "expectedResult=true but isApplicable=false" situations. Extend
the logic to check for those.
Also move from t.Fatal* to t.Error*, because there's no harm in moving
on to check the other condition, even if the first condition we check
has a problem. Checking both will give the developer more information
about what they need to fix to make the test happy, without them
needing to retest after fixing one property before they hear about a
problem with the other property.
[1]: #1368 (comment)1 parent f2ac936 commit 7bc530d
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3992 | 3992 | | |
3993 | 3993 | | |
3994 | 3994 | | |
3995 | | - | |
3996 | | - | |
| 3995 | + | |
| 3996 | + | |
3997 | 3997 | | |
3998 | | - | |
3999 | | - | |
4000 | | - | |
4001 | | - | |
4002 | | - | |
| 3998 | + | |
| 3999 | + | |
| 4000 | + | |
| 4001 | + | |
4003 | 4002 | | |
4004 | 4003 | | |
4005 | 4004 | | |
| |||
0 commit comments