test/cases: add RHEL 9.0 and CentOS 9 cases to test scripts

This commit is contained in:
Achilleas Koutsou 2021-10-27 16:05:00 +02:00 committed by Ondřej Budai
parent 1dd139e758
commit a025601b85
8 changed files with 38 additions and 18 deletions

View file

@ -429,6 +429,14 @@ case "$ID-$VERSION_ID" in
SSH_USER="cloud-user"
fi
;;
"centos-9")
DISTRO="centos-9"
if [[ "$CLOUD_PROVIDER" == "$CLOUD_PROVIDER_AWS" ]]; then
SSH_USER="ec2-user"
else
SSH_USER="cloud-user"
fi
;;
esac
# Only RHEL need subscription block.

View file

@ -289,6 +289,10 @@ case $(set +x; . /etc/os-release; echo "$ID-$VERSION_ID") in
DISTRO="centos-8"
SSH_USER="cloud-user"
;;
"centos-9")
DISTRO="centos-9"
SSH_USER="cloud-user"
;;
esac
# Only RHEL need subscription block.

View file

@ -7,10 +7,14 @@ set -euo pipefail
source /etc/os-release
if [[ "${ID}-${VERSION_ID}" != "rhel-8.6" && "${ID}-${VERSION_ID}" != "rhel-9.0" ]]; then
echo "$0 is only enabled for rhel-8.6 and rhel-9.0; skipping..."
exit 0
fi
case "${ID}-${VERSION_ID}" in
"rhel-8.6" | "rhel-9.0" | "centos-9")
;;
*)
echo "$0 is not enabled for ${ID}-${VERSION_ID} skipping..."
exit 0
;;
esac
# Provision the software under test.
/usr/libexec/osbuild-composer-test/provision.sh

View file

@ -101,7 +101,7 @@ case "${ID}-${VERSION_ID}" in
USER_IN_UPGRADE_BP="true"
INSTALLER_PATH="/ostree/repo"
;;
"rhel-8.6" | "centos-8")
"rhel-8.6" | "centos-8" | "rhel-9.0" | "centos-9")
CONTAINER_TYPE=edge-container
CONTAINER_FILENAME=container.tar
INSTALLER_TYPE=edge-installer
@ -109,13 +109,6 @@ case "${ID}-${VERSION_ID}" in
USER_IN_UPGRADE_BP="false"
INSTALLER_PATH="/run/install/repo/ostree/repo"
;;
"rhel-9.0")
CONTAINER_TYPE=edge-container
CONTAINER_FILENAME=container.tar
INSTALLER_TYPE=edge-installer
INSTALLER_FILENAME=installer.iso
USER_IN_UPGRADE_BP="true"
;;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;

View file

@ -85,7 +85,7 @@ SSH_KEY=${SSH_DATA_DIR}/id_rsa
SSH_KEY_PUB=$(cat "${SSH_KEY}".pub)
case "${ID}-${VERSION_ID}" in
"rhel-8.6" | "centos-8" | "rhel-9.0")
"rhel-8.6" | "centos-8" | "rhel-9.0" | "centos-9")
CONTAINER_TYPE=edge-container
CONTAINER_FILENAME=container.tar
INSTALLER_TYPE=edge-raw-image

View file

@ -94,7 +94,7 @@ SSH_KEY=${SSH_DATA_DIR}/id_rsa
SSH_KEY_PUB=$(cat "${SSH_KEY}".pub)
case "${ID}-${VERSION_ID}" in
"rhel-8.6" | "centos-8" | "rhel-9.0")
"rhel-8.6" | "centos-8" | "rhel-9.0" | "centos-9")
CONTAINER_TYPE=edge-container
CONTAINER_FILENAME=container.tar
INSTALLER_TYPE=edge-simplified-installer

View file

@ -35,6 +35,12 @@ case "${ID}-${VERSION_ID}" in
OS_VARIANT="rhel9.0"
USER_IN_COMMIT="true"
BOOT_LOCATION="$COMPOSE_URL/compose/BaseOS/x86_64/os/";;
"centos-9")
IMAGE_TYPE=edge-commit
OSTREE_REF="centos/9/${ARCH}/edge"
OS_VARIANT="centos9"
USER_IN_COMMIT="true"
BOOT_LOCATION="$COMPOSE_URL/compose/BaseOS/x86_64/os/";;
*)
echo "unsupported distro: ${ID}-${VERSION_ID}"
exit 1;;

View file

@ -17,10 +17,15 @@ source /etc/os-release
# Provision the software under test.
/usr/libexec/osbuild-composer-test/provision.sh
if [[ "${ID}-${VERSION_ID}" != "rhel-8.6" && "${ID}-${VERSION_ID}" != "rhel-9.0" ]]; then
echo "$0 is only enabled for rhel-8.6 and rhel-9.0; skipping..."
exit 0
fi
case "${ID}-${VERSION_ID}" in
"rhel-8.6" | "rhel-9.0" | "centos-9")
;;
*)
echo "$0 is not enabled for ${ID}-${VERSION_ID} skipping..."
exit 0
;;
esac
set -xeuo pipefail