Commit a945538
authored
Guard cnv_current_version against missing csv spec.version (#4003)
##### Short description:
spec.version is not a required field in the ClusterServiceVersion
schema. If absent, the fixture silently returns None causing unexpected
behavior in multiple downstream tests.
##### More details:
##### What this PR does / why we need it:
identified during verifying
#3984
that we always assume csv has .spec.version , although it exist but
since it's optional if it's not there , We should fail early and at
right place
##### Which issue(s) this PR fixes:
##### Special notes for reviewer:
##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Enhanced validation to ensure CSV specification version information is
properly defined, raising an error if the required version field is
missing rather than silently accepting empty values.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: Geetika Kapoor <gkapoor@redhat.com>1 parent cfdc38b commit a945538
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
956 | 956 | | |
957 | 957 | | |
958 | 958 | | |
959 | | - | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
960 | 963 | | |
961 | 964 | | |
962 | 965 | | |
| |||
0 commit comments