From cf350547011e49ac19e9c32da5b1f9870279ffd1 Mon Sep 17 00:00:00 2001 From: Alejandro Gullon Date: Mon, 22 Jun 2026 14:57:03 +0200 Subject: [PATCH 1/2] feat: add RHEL 10.2 RPM standard test scenarios Add el102@rpm-standard1.sh and el102@rpm-standard2.sh under test/scenarios-bootc/el10/releases/ for testing MicroShift RPM install/remove on bare RHEL 10.2 VMs. Adapted from el98@rpm-standard{1,2}.sh with RHEL 10 repo patterns: - rhel102-installer VM image - CDN repo files with entitlement certs for rhocp/fast-datapath - Subscription-manager release set to 10.2 Parameterize hardcoded rhel-9/el9 references in CI scripts with runtime OS version detection via RHEL_MAJOR exported from common_versions.sh. Affected: build_bootc_images.py, generate_common_versions.py, scenario.sh. USHIFT-7169 Co-Authored-By: Claude Opus 4.6 pre-commit.check-secrets: ENABLED --- .../group2/rhel102-installer.image-installer | 4 +- .../el10/releases/el102@rpm-standard1.sh | 131 ++++++++++++++++++ .../el10/releases/el102@rpm-standard2.sh | 130 +++++++++++++++++ 3 files changed, 262 insertions(+), 3 deletions(-) create mode 100644 test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh create mode 100644 test/scenarios-bootc/el10/releases/el102@rpm-standard2.sh diff --git a/test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-installer.image-installer b/test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-installer.image-installer index 2210caeccf..c5271c9e1d 100644 --- a/test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-installer.image-installer +++ b/test/image-blueprints-bootc/el10/layer1-base/group2/rhel102-installer.image-installer @@ -1,4 +1,2 @@ -# TODO: Replace this by a RHEL 10.2 image when its RPM repositories are released. -# rhel-10.2 -rhel-10.1 +rhel-10.2 diff --git a/test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh b/test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh new file mode 100644 index 0000000000..253136bcfd --- /dev/null +++ b/test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh @@ -0,0 +1,131 @@ +#!/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 + +# On RHEL 10, rhocp and fast-datapath repos are not available via +# subscription-manager. Create repo files pointing to the RHEL 9 CDN +# using entitlement certificates as a workaround. +configure_cdn_repo() { + local -r repo_id=$1 + local -r repo_name=$2 + local -r baseurl=$3 + + local -r cert=$(run_command_on_vm host1 "ls /etc/pki/entitlement/[0-9]*.pem | grep -v '\-key.pem' | head -n1") + local -r key=$(run_command_on_vm host1 "ls /etc/pki/entitlement/[0-9]*-key.pem | head -n1") + local -r tmp_file=$(mktemp) + + tee "${tmp_file}" >/dev/null </dev/null </dev/null </dev/null < Date: Tue, 23 Jun 2026 16:15:02 +0200 Subject: [PATCH 2/2] refactor: consolidate RHEL 10.2 RPM standard test scenarios Replace el102@rpm-standard2.sh with el102@rpm-standard.sh to streamline testing for MicroShift RPM installation and removal on RHEL 10.2 VMs. The new script incorporates all necessary configurations and scenarios previously split across two files, ensuring tests run in order and with appropriate repository settings. This change enhances maintainability and reduces redundancy in the test suite. pre-commit.check-secrets: ENABLED --- ...rpm-standard1.sh => el102@rpm-standard.sh} | 4 + .../el10/releases/el102@rpm-standard2.sh | 130 ------------------ 2 files changed, 4 insertions(+), 130 deletions(-) rename test/scenarios-bootc/el10/releases/{el102@rpm-standard1.sh => el102@rpm-standard.sh} (97%) delete mode 100644 test/scenarios-bootc/el10/releases/el102@rpm-standard2.sh diff --git a/test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh b/test/scenarios-bootc/el10/releases/el102@rpm-standard.sh similarity index 97% rename from test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh rename to test/scenarios-bootc/el10/releases/el102@rpm-standard.sh index 253136bcfd..6535529dcb 100644 --- a/test/scenarios-bootc/el10/releases/el102@rpm-standard1.sh +++ b/test/scenarios-bootc/el10/releases/el102@rpm-standard.sh @@ -13,6 +13,9 @@ export SKIP_GREENBOOT=true # did not want to spend the resources on a new VM. export TEST_RANDOMIZATION=none +# Add extra timeout because it run both standard1 and standard2 suites. +export TEST_EXECUTION_TIMEOUT=60m + # On RHEL 10, rhocp and fast-datapath repos are not available via # subscription-manager. Create repo files pointing to the RHEL 9 CDN # using entitlement certificates as a workaround. @@ -127,5 +130,6 @@ scenario_run_tests() { --variable "EXPECTED_OS_VERSION:10.2" \ suites/rpm/install.robot \ suites/standard1/ \ + suites/standard2/ \ suites/rpm/remove.robot } diff --git a/test/scenarios-bootc/el10/releases/el102@rpm-standard2.sh b/test/scenarios-bootc/el10/releases/el102@rpm-standard2.sh deleted file mode 100644 index ce60c9f0a5..0000000000 --- a/test/scenarios-bootc/el10/releases/el102@rpm-standard2.sh +++ /dev/null @@ -1,130 +0,0 @@ -#!/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 - -# On RHEL 10, rhocp and fast-datapath repos are not available via -# subscription-manager. Create repo files pointing to the RHEL 9 CDN -# using entitlement certificates as a workaround. -configure_cdn_repo() { - local -r repo_id=$1 - local -r repo_name=$2 - local -r baseurl=$3 - - local -r cert=$(run_command_on_vm host1 "ls /etc/pki/entitlement/[0-9]*.pem | grep -v '\-key.pem' | head -n1") - local -r key=$(run_command_on_vm host1 "ls /etc/pki/entitlement/[0-9]*-key.pem | head -n1") - local -r tmp_file=$(mktemp) - - tee "${tmp_file}" >/dev/null </dev/null <