From f711219f0af299ab048fc8c1c9f7f2fe62c200e3 Mon Sep 17 00:00:00 2001 From: Irene Diez Date: Tue, 13 Dec 2022 15:35:57 +0100 Subject: [PATCH] tests: update si tests with ignition blueprint Signed-off-by: Irene Diez --- test/cases/ostree-simplified-installer.sh | 54 +++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/test/cases/ostree-simplified-installer.sh b/test/cases/ostree-simplified-installer.sh index f4d21b19f..ab8bc3656 100755 --- a/test/cases/ostree-simplified-installer.sh +++ b/test/cases/ostree-simplified-installer.sh @@ -885,6 +885,60 @@ EOF sudo ansible-playbook -v -i "${TEMPDIR}"/inventory -e image_type=redhat -e ostree_commit="${INSTALL_HASH}" -e edge_type=edge-simplified-installer -e fdo_credential="false" /usr/share/tests/osbuild-composer/ansible/check_ostree.yaml || RESULTS=0 check_result +######################################################################## +## +## Build edge-simplified-installer with ignition embedded +## (only on rhel9+) +## +######################################################################## + +if [[ "${ID}-${VERSION_ID}" = "rhel-9.1" || "${ID}-${VERSION_ID}" = "centos-9" ]]; then + tee "$BLUEPRINT_FILE" > /dev/null < /dev/null + ISO_FILENAME="${COMPOSE_ID}-${INSTALLER_FILENAME}" + + # Mount the image + sudo mkdir /mnt/installer + sudo mount -o loop "${ISO_FILENAME}" /mnt/installer + + # Check that the image contains the ignition_url file + if [[ -f "/mnt/installer/ignition_url" ]]; then + RESULTS=1 + fi + + # Check the resulting image + check_result + + sudo umount /mnt/installer +else + greenprint "Skipping ignition embedded url test, it's only for RHEL9" +fi + + ######################## ## ## Build upgrade image