Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/kola: adapt for new pure-RHEL variants #3032

Merged
merged 2 commits into from
Jun 19, 2024

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jun 18, 2024

A big part of the new variants added in
openshift/os#1445 is that we only minimally
modify /etc/os-release. This means that e.g. ID is still rhel and
VERSION_ID is e.g. 9.4 for the rhel-9.4 variant. We do still
inject VARIANT and VARIANT_ID though.

Adapt these library functions here to handle this.

A big part of the new variants added in
openshift/os#1445 is that we only minimally
modify `/etc/os-release`. This means that e.g. `ID` is still `rhel` and
`VERSION_ID` is e.g. `9.4` for the `rhel-9.4` variant. We do still
inject `VARIANT` and `VARIANT_ID` though.

Adapt these library functions here to handle this.
Copy link
Member

@marmijo marmijo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I left one comment

@@ -160,7 +160,7 @@ if [ "$ID" == "fedora" ]; then
else
fatal "fail: not operating on expected OS version"
fi
elif [[ "${ID_LIKE}" =~ "rhel" ]]; then
elif [[ "${ID}" = "rhel" ]] || [[ "${ID_LIKE}" =~ "rhel" ]]; then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we've mostly used == for comparisons like these. I'm fine leaving it as is though because it's identical behavior in bash.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's kind of a mess. Would've been nice if bash only supported one kind. I don't think we have any consistency overall in this codebase one way or the other.

@jlebon jlebon merged commit 19daddd into coreos:testing-devel Jun 19, 2024
3 checks passed
@jlebon jlebon deleted the pr/rhcos-tweaks branch June 19, 2024 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants