Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions kola-denylist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
# coreos-assembler to automatically skip some tests. For more information,
# see: https://github.com/coreos/coreos-assembler/pull/866.

- pattern: ext.config.version.rhaos-pkgs-match-openshift
tracker: https://github.com/openshift/os/issues/1847

- pattern: rhcos.network.init-interfaces-test
tracker: https://github.com/openshift/os/issues/1852
arches:
Expand Down
1 change: 1 addition & 0 deletions tests/kola/files/openvswitch-hugetlbfs-groups
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## exclusive: false
## architectures: "x86_64 ppc64le"
## description: Verify openvswitch user is in the hugetlbfs group.
## tags: openshift

set -xeuo pipefail

Expand Down
17 changes: 16 additions & 1 deletion tests/kola/version/rhaos-pkgs-match-openshift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
## description: Verify that packages coming from the rhaos
## branches match the OpenShift version.
## This is RHCOS only.
## tags: openshift

set -xeuo pipefail

Expand All @@ -13,7 +14,21 @@ set -xeuo pipefail
# source the environment variables to get OPENSHIFT_VERSION
source /etc/os-release

rpm -qa | grep "rhaos" > /tmp/rhaos-packages.txt
# These are packages that are known to not match the
# targeted version of openshift. Exlude them from the test.
RHAOS_PACKAGE_EXCEPTIONS=(
# toolbox doesn't always match the target ocp version because it
# is included in the base-image which spans multiple versions
toolbox
# conmon currently is missing 4.19+ vesions of the package
conmon-rs
)

exception_pattern=$(echo ${RHAOS_PACKAGE_EXCEPTIONS[@]} | tr " " "|")

# Use `|| true` here to allow situations where RHAOS_PACKAGE_EXCEPTIONS contains every
# rhaos package in the image, which would otherwise cause `grep -Ev` to fail the test.
rpm -qa | grep "rhaos" | grep -Ev "${exception_pattern}" > /tmp/rhaos-packages.txt || true

if grep -v "rhaos${OPENSHIFT_VERSION}" /tmp/rhaos-packages.txt; then
fatal "Error: rhaos packages do not match OpenShift version"
Expand Down