test: use hyphen in DISTRO_CODE instead of underscore

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Ondřej Budai 2021-07-09 12:13:31 +02:00 committed by Ondřej Budai
parent 4c5d1ae45a
commit 27693b1949
4 changed files with 4 additions and 7 deletions

View file

@ -22,7 +22,7 @@ fi
# Skip 'selinux/contect-mismatch' part of the image-info report on RHEL-8.
# https://bugzilla.redhat.com/show_bug.cgi?id=1973754
if [[ "${DISTRO_CODE}" =~ "rhel_8" ]]; then
if [[ "${DISTRO_CODE}" =~ "rhel-8" ]]; then
IMAGE_TEST_CASE_RUNNER="${IMAGE_TEST_CASE_RUNNER} -skip-selinux-ctx-check"
fi

View file

@ -14,9 +14,6 @@ function greenprint {
# Provision the software under test.
/usr/libexec/osbuild-composer-test/provision.sh
greenprint "Defining distro selector"
DISTRO_SELECTOR="${DISTRO_CODE//_/-}"
greenprint "Starting containers"
sudo /usr/libexec/osbuild-composer-test/run-koji-container.sh start
@ -48,7 +45,7 @@ greenprint "Creating Koji task"
koji --server=http://localhost:8080/kojihub --user kojiadmin --password kojipass --authtype=password make-task image
greenprint "Pushing compose to Koji"
sudo /usr/libexec/osbuild-composer-test/koji-compose.py "$DISTRO_SELECTOR" "${ARCH}"
sudo /usr/libexec/osbuild-composer-test/koji-compose.py "$DISTRO_CODE" "${ARCH}"
greenprint "Show Koji task"
koji --server=http://localhost:8080/kojihub taskinfo 1

View file

@ -13,7 +13,7 @@ source /usr/libexec/osbuild-composer-test/set-env-variables.sh
/usr/libexec/osbuild-composer-test/libvirt_test.sh openstack
# RHEL 8.4 and Centos Stream 8 images also supports uefi, check that
if [[ "$DISTRO_CODE" == "rhel_84" || "$DISTRO_CODE" == "rhel_85" || "$DISTRO_CODE" == "centos_8" || "$DISTRO_CODE" == "rhel_90" ]]; then
if [[ "$DISTRO_CODE" == "rhel-84" || "$DISTRO_CODE" == "rhel-85" || "$DISTRO_CODE" == "centos-8" || "$DISTRO_CODE" == "rhel-90" ]]; then
echo "🐄 Booting qcow2 image in UEFI mode on RHEL/Centos Stream"
/usr/libexec/osbuild-composer-test/libvirt_test.sh qcow2 uefi
fi

View file

@ -4,4 +4,4 @@
source /etc/os-release
ARCH=$(uname -m)
DISTRO_CODE="${DISTRO_CODE:-${ID}_${VERSION_ID//./}}"
DISTRO_CODE="${DISTRO_CODE:-${ID}-${VERSION_ID//./}}"