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: fix boot.bootupd-validate on rhel-9.6 #3297

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Dec 4, 2024

In the el-only variants, there is no RHEL_VERSION since the RHEL version is VERSION_ID.

Add a new get_rhel_ver commonlib function to abstract this away and use that in the test.

Don't bother checking for the VARIANT_ID. We only care about the coreos variant in the tests in this repo. (And once we start moving tests to fedora-bootc, we would want to remove these checks anyway.)

In the el-only variants, there is no `RHEL_VERSION` since the RHEL
version _is_ `VERSION_ID`.

Add a new `get_rhel_ver` commonlib function to abstract this away and
use that in the test.

Don't bother checking for the `VARIANT_ID`. We only care about the
coreos variant in the tests in this repo. (And once we start moving
tests to fedora-bootc, we would want to remove these checks anyway.)
@@ -84,7 +84,7 @@ validate() {
# should remove this until https://issues.redhat.com/browse/RHEL-66584 is fixed
set_selinux_permissve() {
source /etc/os-release
if is_scos || ([ "${RHEL_VERSION}" == "9.6" ] && [ "${VARIANT_ID}" == "coreos" ] ); then
if is_scos || [ "$(get_rhel_ver)" = "9.6" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if is_scos || [ "$(get_rhel_ver)" = "9.6" ]; then
if is_scos || [ "$(get_rhel_ver)" == "9.6" ]; then

I tend to prefer the == variant.

@jlebon jlebon enabled auto-merge (rebase) December 4, 2024 21:43
@jlebon jlebon merged commit 86e9395 into coreos:testing-devel Dec 4, 2024
3 checks passed
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.

2 participants