diff --git a/test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-y1-with-optional.containerfile b/test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-y1-with-optional.containerfile new file mode 100644 index 0000000000..71deb10b89 --- /dev/null +++ b/test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-y1-with-optional.containerfile @@ -0,0 +1,48 @@ +# {{- if env.Getenv "BREW_Y1_RELEASE_VERSION" "" -}} +# Note: This comment makes templating add a new line before the code +FROM localhost/rhel98-test-agent:latest + +# Build arguments +ARG USHIFT_RPM_REPO_NAME=microshift-brew +ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME + +# Copy the MicroShift repository contents +COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH + +# Copy repository configuration +COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo ./bootc-images/microshift-fast-datapath-rhel9.repo ./bootc-images/microshift-rhocp-y1.repo \ + /etc/yum.repos.d/ + +# Print repository configuration contents. +# Install MicroShift, test agent and cleanup. +RUN dnf repoinfo --enabled && \ + dnf install -y firewalld systemd-resolved \ + {{ range (env.Getenv "MICROSHIFT_MANDATORY_RPMS" | strings.Split " ") -}} + "{{ . }}-{{ env.Getenv "BREW_Y1_RELEASE_VERSION" }}" \ + {{ end -}} + {{ range (env.Getenv "MICROSHIFT_Y1_OPTIONAL_RPMS" | strings.Split " ") -}} + "{{ . }}-{{ env.Getenv "BREW_Y1_RELEASE_VERSION" }}" \ + {{ end -}} + {{ if and (env.Getenv "UNAME_M" "") (eq "x86_64" .Env.UNAME_M) -}} + {{ range (env.Getenv "MICROSHIFT_Y1_X86_64_RPMS" | strings.Split " ") -}} + "{{ . }}-{{ env.Getenv "BREW_Y1_RELEASE_VERSION" }}" \ + {{ end -}} + {{ end -}} + && \ + systemctl enable microshift microshift-test-agent && \ + rm -vf /etc/yum.repos.d/microshift-*.repo && \ + rm -rvf $USHIFT_RPM_REPO_PATH && \ + dnf clean all + +# Configure firewall +RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \ + firewall-offline-cmd --zone=trusted --add-source=10.42.0.0/16 && \ + firewall-offline-cmd --zone=trusted --add-source=169.254.169.1 && \ + firewall-offline-cmd --zone=trusted --add-source=fd01::/48 && \ + firewall-offline-cmd --zone=public --add-port=80/tcp && \ + firewall-offline-cmd --zone=public --add-port=443/tcp && \ + firewall-offline-cmd --zone=public --add-port=5353/udp && \ + firewall-offline-cmd --zone=public --add-port=6443/tcp && \ + firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \ + firewall-offline-cmd --zone=public --add-port=30000-32767/udp +# {{- end -}} diff --git a/test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-y2-with-optional.containerfile b/test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-y2-with-optional.containerfile new file mode 100644 index 0000000000..48e3609199 --- /dev/null +++ b/test/image-blueprints-bootc/el9/layer4-release/group1/rhel98-bootc-brew-y2-with-optional.containerfile @@ -0,0 +1,48 @@ +# {{- if env.Getenv "BREW_Y2_RELEASE_VERSION" "" -}} +# Note: This comment makes templating add a new line before the code +FROM localhost/rhel98-test-agent:latest + +# Build arguments +ARG USHIFT_RPM_REPO_NAME=microshift-brew +ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME + +# Copy the MicroShift repository contents +COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH + +# Copy repository configuration +COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo ./bootc-images/microshift-fast-datapath-rhel9.repo ./bootc-images/microshift-rhocp-y2.repo \ + /etc/yum.repos.d/ + +# Print repository configuration contents. +# Install MicroShift, test agent and cleanup. +RUN dnf repoinfo --enabled && \ + dnf install -y firewalld systemd-resolved \ + {{ range (env.Getenv "MICROSHIFT_MANDATORY_RPMS" | strings.Split " ") -}} + "{{ . }}-{{ env.Getenv "BREW_Y2_RELEASE_VERSION" }}" \ + {{ end -}} + {{ range (env.Getenv "MICROSHIFT_Y2_OPTIONAL_RPMS" | strings.Split " ") -}} + "{{ . }}-{{ env.Getenv "BREW_Y2_RELEASE_VERSION" }}" \ + {{ end -}} + {{ if and (env.Getenv "UNAME_M" "") (eq "x86_64" .Env.UNAME_M) -}} + {{ range (env.Getenv "MICROSHIFT_Y2_X86_64_RPMS" | strings.Split " ") -}} + "{{ . }}-{{ env.Getenv "BREW_Y2_RELEASE_VERSION" }}" \ + {{ end -}} + {{ end -}} + && \ + systemctl enable microshift microshift-test-agent && \ + rm -vf /etc/yum.repos.d/microshift-*.repo && \ + rm -rvf $USHIFT_RPM_REPO_PATH && \ + dnf clean all + +# Configure firewall +RUN firewall-offline-cmd --zone=public --add-port=22/tcp && \ + firewall-offline-cmd --zone=trusted --add-source=10.42.0.0/16 && \ + firewall-offline-cmd --zone=trusted --add-source=169.254.169.1 && \ + firewall-offline-cmd --zone=trusted --add-source=fd01::/48 && \ + firewall-offline-cmd --zone=public --add-port=80/tcp && \ + firewall-offline-cmd --zone=public --add-port=443/tcp && \ + firewall-offline-cmd --zone=public --add-port=5353/udp && \ + firewall-offline-cmd --zone=public --add-port=6443/tcp && \ + firewall-offline-cmd --zone=public --add-port=30000-32767/tcp && \ + firewall-offline-cmd --zone=public --add-port=30000-32767/udp +# {{- end -}} diff --git a/test/image-blueprints/layer4-release/group1/rhel98-brew-y2-with-optionals.toml b/test/image-blueprints/layer4-release/group1/rhel98-brew-y2-with-optionals.toml new file mode 100644 index 0000000000..559cd40e0d --- /dev/null +++ b/test/image-blueprints/layer4-release/group1/rhel98-brew-y2-with-optionals.toml @@ -0,0 +1,67 @@ +{{- if env.Getenv "BREW_Y2_RELEASE_VERSION" "" -}} +{{- /* + + We wrap this template in a test so that the body of the output is + empty when there is no "current" version release. The output file + must end up completely empty, so we need to remove whitespace from + around the first and last template instructions. + +*/ -}} + +name = "rhel-9.8-microshift-brew-optionals-{{ .Env.YMINUS2_MAJOR_VERSION }}.{{ .Env.YMINUS2_MINOR_VERSION }}-zstream" +description = "A RHEL 9.8 image with already built and released RPMs like EC, RC, or Z-stream release: {{ .Env.BREW_Y2_RELEASE_VERSION }}" +version = "0.0.1" +modules = [] +groups = [] +distro = "rhel-98" + +{{ range (env.Getenv "MICROSHIFT_MANDATORY_RPMS" | strings.Split " ") }} +[[packages]] +name = "{{ . }}" +version = "{{ env.Getenv "BREW_Y2_RELEASE_VERSION" }}" +{{ end }} + +{{ range (env.Getenv "MICROSHIFT_Y2_OPTIONAL_RPMS" | strings.Split " ") }} +[[packages]] +name = "{{ . }}" +version = "{{ env.Getenv "BREW_Y2_RELEASE_VERSION" }}" +{{ end }} + +{{- if and (env.Getenv "UNAME_M" "") (eq "x86_64" .Env.UNAME_M) }} +{{ range (env.Getenv "MICROSHIFT_Y2_X86_64_RPMS" | strings.Split " ") }} +[[packages]] +name = "{{ . }}" +version = "{{ env.Getenv "BREW_Y2_RELEASE_VERSION" }}" +{{ end }} +{{- end }} + +[[packages]] +name = "microshift-test-agent" +version = "*" + +[[packages]] +name = "pcp-zeroconf" +version = "*" + +[customizations.services] +enabled = ["microshift", "microshift-test-agent", "pmcd", "pmlogger"] + +[customizations.firewall] +ports = [ + "22:tcp", + "80:tcp", + "443:tcp", + "5353:udp", + "6443:tcp", + "8889:tcp", + "30000-32767:tcp", + "30000-32767:udp", +] + +[customizations.firewall.services] +enabled = ["mdns", "ssh", "http", "https"] + +[[customizations.firewall.zones]] +name = "trusted" +sources = ["10.42.0.0/16", "169.254.169.1", "fd01::/48"] +{{- end -}} diff --git a/test/image-blueprints/layer4-release/group2/rhel98-brew-y1-with-optionals.toml b/test/image-blueprints/layer4-release/group2/rhel98-brew-y1-with-optionals.toml new file mode 100644 index 0000000000..136b566ee0 --- /dev/null +++ b/test/image-blueprints/layer4-release/group2/rhel98-brew-y1-with-optionals.toml @@ -0,0 +1,67 @@ +{{- if env.Getenv "BREW_Y1_RELEASE_VERSION" "" -}} +{{- /* + + We wrap this template in a test so that the body of the output is + empty when there is no "current" version release. The output file + must end up completely empty, so we need to remove whitespace from + around the first and last template instructions. + +*/ -}} + +name = "rhel-9.8-microshift-brew-optionals-{{ .Env.PREVIOUS_MAJOR_VERSION }}.{{ .Env.PREVIOUS_MINOR_VERSION }}-zstream" +description = "A RHEL 9.8 image with already built and released RPMs like EC, RC, or Z-stream release: {{ .Env.BREW_Y1_RELEASE_VERSION }}" +version = "0.0.1" +modules = [] +groups = [] +distro = "rhel-98" + +{{ range (env.Getenv "MICROSHIFT_MANDATORY_RPMS" | strings.Split " ") }} +[[packages]] +name = "{{ . }}" +version = "{{ env.Getenv "BREW_Y1_RELEASE_VERSION" }}" +{{ end }} + +{{ range (env.Getenv "MICROSHIFT_Y1_OPTIONAL_RPMS" | strings.Split " ") }} +[[packages]] +name = "{{ . }}" +version = "{{ env.Getenv "BREW_Y1_RELEASE_VERSION" }}" +{{ end }} + +{{- if and (env.Getenv "UNAME_M" "") (eq "x86_64" .Env.UNAME_M) }} +{{ range (env.Getenv "MICROSHIFT_Y1_X86_64_RPMS" | strings.Split " ") }} +[[packages]] +name = "{{ . }}" +version = "{{ env.Getenv "BREW_Y1_RELEASE_VERSION" }}" +{{ end }} +{{- end }} + +[[packages]] +name = "microshift-test-agent" +version = "*" + +[[packages]] +name = "pcp-zeroconf" +version = "*" + +[customizations.services] +enabled = ["microshift", "microshift-test-agent", "pmcd", "pmlogger"] + +[customizations.firewall] +ports = [ + "22:tcp", + "80:tcp", + "443:tcp", + "5353:udp", + "6443:tcp", + "8889:tcp", + "30000-32767:tcp", + "30000-32767:udp", +] + +[customizations.firewall.services] +enabled = ["mdns", "ssh", "http", "https"] + +[[customizations.firewall.zones]] +name = "trusted" +sources = ["10.42.0.0/16", "169.254.169.1", "fd01::/48"] +{{- end -}} diff --git a/test/scenarios-bootc/el9/releases/el98-y1@el98-lrel@lvms-standard.sh b/test/scenarios-bootc/el9/releases/el98-y1@el98-lrel@lvms-standard.sh new file mode 100644 index 0000000000..d50523a2c2 --- /dev/null +++ b/test/scenarios-bootc/el9/releases/el98-y1@el98-lrel@lvms-standard.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +# NOTE: Unlike most suites, these tests rely on being run IN ORDER to +# ensure MicroShift is upgraded before running validation tests +export TEST_RANDOMIZATION=none + +start_image="rhel98-bootc-brew-y1-with-optional" +dest_image="rhel98-bootc-brew-lrel-optional" + +scenario_create_vms() { + exit_if_image_not_found "${start_image}" + exit_if_image_not_found "${dest_image}" + + prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}" + launch_vm rhel98-bootc --vm_disksize 30 --vm_vcpus 4 +} + +scenario_remove_vms() { + exit_if_image_not_found "${start_image}" + exit_if_image_not_found "${dest_image}" + + remove_vm host1 +} + +scenario_run_tests() { + exit_if_image_not_found "${start_image}" + exit_if_image_not_found "${dest_image}" + + # Wait for MicroShift to be ready + wait_for_microshift_to_be_ready host1 + + # Setup oc client and kubeconfig for ginkgo tests + setup_oc_and_kubeconfig host1 + + # Pre-upgrade: Create LVMS workloads and validate LVMS is working + echo "INFO: Creating LVMS workloads before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/createWorkloads.sh" + + echo "INFO: Checking LVMS resources before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Perform upgrade and validate + run_tests host1 \ + --variable "TARGET_REF:${dest_image}" \ + --variable "BOOTC_REGISTRY:${MIRROR_REGISTRY_URL}" \ + suites/upgrade/upgrade-successful.robot + + # Post-upgrade: Validate LVMS workloads survived the upgrade + echo "INFO: Checking LVMS workloads survived upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkWorkloadExists.sh" + + echo "INFO: Checking LVMS resources after upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Cleanup LVMS workloads + echo "INFO: Cleaning up LVMS workloads..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/cleanupWorkload.sh" + + # Run standard suites for basic validation after upgrade + run_tests host1 \ + --variable "EXPECTED_OS_VERSION:9.8" \ + suites/standard1/ \ + suites/standard2/ +} diff --git a/test/scenarios-bootc/el9/releases/el98-y2@el98-lrel@lvms-standard.sh b/test/scenarios-bootc/el9/releases/el98-y2@el98-lrel@lvms-standard.sh new file mode 100644 index 0000000000..6ee2075f16 --- /dev/null +++ b/test/scenarios-bootc/el9/releases/el98-y2@el98-lrel@lvms-standard.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +# NOTE: Unlike most suites, these tests rely on being run IN ORDER to +# ensure MicroShift is upgraded before running validation tests +export TEST_RANDOMIZATION=none + +start_image="rhel98-bootc-brew-y2-with-optional" +dest_image="rhel98-bootc-brew-lrel-optional" + +scenario_create_vms() { + exit_if_image_not_found "${start_image}" + exit_if_image_not_found "${dest_image}" + + prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}" + launch_vm rhel98-bootc --vm_disksize 30 --vm_vcpus 4 +} + +scenario_remove_vms() { + exit_if_image_not_found "${start_image}" + exit_if_image_not_found "${dest_image}" + + remove_vm host1 +} + +scenario_run_tests() { + exit_if_image_not_found "${start_image}" + exit_if_image_not_found "${dest_image}" + + # Wait for MicroShift to be ready + wait_for_microshift_to_be_ready host1 + + # Setup oc client and kubeconfig for ginkgo tests + setup_oc_and_kubeconfig host1 + + # Pre-upgrade: Create LVMS workloads and validate LVMS is working + echo "INFO: Creating LVMS workloads before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/createWorkloads.sh" + + echo "INFO: Checking LVMS resources before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Perform upgrade and validate + run_tests host1 \ + --variable "TARGET_REF:${dest_image}" \ + --variable "BOOTC_REGISTRY:${MIRROR_REGISTRY_URL}" \ + suites/upgrade/upgrade-successful.robot + + # Post-upgrade: Validate LVMS workloads survived the upgrade + echo "INFO: Checking LVMS workloads survived upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkWorkloadExists.sh" + + echo "INFO: Checking LVMS resources after upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Cleanup LVMS workloads + echo "INFO: Cleaning up LVMS workloads..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/cleanupWorkload.sh" + + # Run standard suites for basic validation after upgrade + run_tests host1 \ + --variable "EXPECTED_OS_VERSION:9.8" \ + suites/standard1/ \ + suites/standard2/ +} diff --git a/test/scenarios/releases/el98@rpm-standard1.sh b/test/scenarios/releases/el98-lrel@rpm-standard1.sh similarity index 100% rename from test/scenarios/releases/el98@rpm-standard1.sh rename to test/scenarios/releases/el98-lrel@rpm-standard1.sh diff --git a/test/scenarios/releases/el98@rpm-standard2.sh b/test/scenarios/releases/el98-lrel@rpm-standard2.sh similarity index 100% rename from test/scenarios/releases/el98@rpm-standard2.sh rename to test/scenarios/releases/el98-lrel@rpm-standard2.sh diff --git a/test/scenarios/releases/el98-yminus1@el98-lrel@lvms-standard.sh b/test/scenarios/releases/el98-yminus1@el98-lrel@lvms-standard.sh new file mode 100644 index 0000000000..50c147efc5 --- /dev/null +++ b/test/scenarios/releases/el98-yminus1@el98-lrel@lvms-standard.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +# NOTE: Unlike most suites, these tests rely on being run IN ORDER to +# ensure MicroShift is upgraded before running validation tests +export TEST_RANDOMIZATION=none + +start_image="rhel-9.8-microshift-brew-optionals-${PREVIOUS_MAJOR_VERSION}.${PREVIOUS_MINOR_VERSION}-zstream" +dest_image="rhel98-brew-lrel-optional" + +scenario_create_vms() { + exit_if_commit_not_found "${start_image}" + exit_if_commit_not_found "${dest_image}" + + prepare_kickstart host1 kickstart.ks.template "${start_image}" + launch_vm rhel-9.8 --vm_disksize 30 --vm_vcpus 4 +} + +scenario_remove_vms() { + exit_if_commit_not_found "${start_image}" + exit_if_commit_not_found "${dest_image}" + + remove_vm host1 +} + +scenario_run_tests() { + exit_if_commit_not_found "${start_image}" + exit_if_commit_not_found "${dest_image}" + + # Wait for MicroShift to be ready + wait_for_microshift_to_be_ready host1 + + # Setup oc client and kubeconfig for ginkgo tests + setup_oc_and_kubeconfig host1 + + # Pre-upgrade: Create LVMS workloads and validate LVMS is working + echo "INFO: Creating LVMS workloads before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/createWorkloads.sh" + + echo "INFO: Checking LVMS resources before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Perform upgrade and validate + run_tests host1 \ + --variable "TARGET_REF:${dest_image}" \ + suites/upgrade/upgrade-successful.robot + + # Post-upgrade: Validate LVMS workloads survived the upgrade + echo "INFO: Checking LVMS workloads survived upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkWorkloadExists.sh" + + echo "INFO: Checking LVMS resources after upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Cleanup LVMS workloads + echo "INFO: Cleaning up LVMS workloads..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/cleanupWorkload.sh" + + # Run standard suites for basic validation after upgrade + run_tests host1 \ + --variable "EXPECTED_OS_VERSION:9.8" \ + suites/standard1/ \ + suites/standard2/ +} diff --git a/test/scenarios/releases/el98@rpm-upgrade.sh b/test/scenarios/releases/el98-yminus1@el98-lrel@rpm.sh similarity index 100% rename from test/scenarios/releases/el98@rpm-upgrade.sh rename to test/scenarios/releases/el98-yminus1@el98-lrel@rpm.sh diff --git a/test/scenarios/releases/el98-yminus2@el98-lrel@lvms-standard.sh b/test/scenarios/releases/el98-yminus2@el98-lrel@lvms-standard.sh new file mode 100644 index 0000000000..1171e1c385 --- /dev/null +++ b/test/scenarios/releases/el98-yminus2@el98-lrel@lvms-standard.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +# NOTE: Unlike most suites, these tests rely on being run IN ORDER to +# ensure MicroShift is upgraded before running validation tests +export TEST_RANDOMIZATION=none + +start_image="rhel-9.8-microshift-brew-optionals-${YMINUS2_MAJOR_VERSION}.${YMINUS2_MINOR_VERSION}-zstream" +dest_image="rhel98-brew-lrel-optional" + +scenario_create_vms() { + exit_if_commit_not_found "${start_image}" + exit_if_commit_not_found "${dest_image}" + + prepare_kickstart host1 kickstart.ks.template "${start_image}" + launch_vm rhel-9.8 --vm_disksize 30 --vm_vcpus 4 +} + +scenario_remove_vms() { + exit_if_commit_not_found "${start_image}" + exit_if_commit_not_found "${dest_image}" + + remove_vm host1 +} + +scenario_run_tests() { + exit_if_commit_not_found "${start_image}" + exit_if_commit_not_found "${dest_image}" + + # Wait for MicroShift to be ready + wait_for_microshift_to_be_ready host1 + + # Setup oc client and kubeconfig for ginkgo tests + setup_oc_and_kubeconfig host1 + + # Pre-upgrade: Create LVMS workloads and validate LVMS is working + echo "INFO: Creating LVMS workloads before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/createWorkloads.sh" + + echo "INFO: Checking LVMS resources before upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Perform upgrade and validate + run_tests host1 \ + --variable "TARGET_REF:${dest_image}" \ + suites/upgrade/upgrade-successful.robot + + # Post-upgrade: Validate LVMS workloads survived the upgrade + echo "INFO: Checking LVMS workloads survived upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkWorkloadExists.sh" + + echo "INFO: Checking LVMS resources after upgrade..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/checkLvmsResources.sh" + + # Cleanup LVMS workloads + echo "INFO: Cleaning up LVMS workloads..." + run_command_on_vm host1 'bash -s' < "${TESTDIR}/../scripts/lvms-helpers/cleanupWorkload.sh" + + # Run standard suites for basic validation after upgrade + run_tests host1 \ + --variable "EXPECTED_OS_VERSION:9.8" \ + suites/standard1/ \ + suites/standard2/ +} diff --git a/test/scenarios/releases/el98-yminus2@el98-lrel@rpm.sh b/test/scenarios/releases/el98-yminus2@el98-lrel@rpm.sh new file mode 100644 index 0000000000..7f06a0dda4 --- /dev/null +++ b/test/scenarios/releases/el98-yminus2@el98-lrel@rpm.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +# The RPM-based image used to create the VM for this test does not +# include MicroShift or greenboot, so tell the framework not to wait +# for greenboot to finish when creating the VM. +export SKIP_GREENBOOT=true + +# NOTE: Unlike most suites, these tests rely on being run IN ORDER to +# ensure the host is in a good state at the start of each test. We +# could have separated them and run them as separate scenarios, but +# did not want to spend the resources on a new VM. +export TEST_RANDOMIZATION=none + +scenario_create_vms() { + exit_if_brew_rpms_not_found + + prepare_kickstart host1 kickstart-liveimg.ks.template "" + launch_vm rhel-9.8 + + # Open the firewall ports. Other scenarios get this behavior by + # embedding settings in the blueprint, but there is no blueprint + # for this scenario. We need do this step before running the RF + # suite so that suite can assume it can reach all of the same + # ports as for any other test. + configure_vm_firewall host1 + + # Register the host with subscription manager so we can install + # dependencies. + subscription_manager_register host1 +} + +scenario_remove_vms() { + exit_if_brew_rpms_not_found + + remove_vm host1 +} + +scenario_run_tests() { + exit_if_brew_rpms_not_found + + local -r reponame=$(basename "${BREW_REPO}") + local -r repo_url="${WEB_SERVER_URL}/rpm-repos/${reponame}" + + # Enable the rhocp and dependency repositories. + # + # Note that rhocp or beta dependencies repository may not yet exist + # for the current version. Then, just use whatever we can get for + # the previous minor version. + configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MAJOR_VERSION}" "${MINOR_VERSION}" + configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MAJOR_VERSION}" "${MINOR_VERSION}" + configure_rhocp_repo "${RHOCP_MINOR_Y2}" "${YMINUS2_MAJOR_VERSION}" "${YMINUS2_MINOR_VERSION}" + configure_microshift_mirror "${YMINUS2_RELEASE_REPO}" + configure_fast_datapath_repo + + run_tests host1 \ + --exitonfailure \ + --variable "SOURCE_REPO_URL:${repo_url}" \ + --variable "TARGET_VERSION:${BREW_LREL_RELEASE_VERSION}" \ + --variable "PREVIOUS_MINOR_VERSION:${YMINUS2_MINOR_VERSION}" \ + suites/rpm/upgrade-successful.robot +}