diff --git a/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-ec-with-optional.image-bootc b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-ec-with-optional.image-bootc new file mode 100644 index 0000000000..b40ceb3b68 --- /dev/null +++ b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-ec-with-optional.image-bootc @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_EC_RELEASE_VERSION" "" -}} +localhost/rhel96-bootc-brew-ec-with-optional:latest +{{- end }} diff --git a/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-rc-with-optional.image-bootc b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-rc-with-optional.image-bootc new file mode 100644 index 0000000000..76cde0cba0 --- /dev/null +++ b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-rc-with-optional.image-bootc @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_RC_RELEASE_VERSION" "" -}} +localhost/rhel96-bootc-brew-rc-with-optional:latest +{{- end }} diff --git a/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-zstream-with-optional.image-bootc b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-zstream-with-optional.image-bootc new file mode 100644 index 0000000000..af993ec682 --- /dev/null +++ b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-zstream-with-optional.image-bootc @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_Y0_RELEASE_VERSION" "" -}} +localhost/rhel96-bootc-brew-zstream-with-optional:latest +{{- end }} diff --git a/test/image-blueprints-bootc/layer1-base/group2/rhel96-bootc.image-bootc b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc.image-bootc similarity index 100% rename from test/image-blueprints-bootc/layer1-base/group2/rhel96-bootc.image-bootc rename to test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc.image-bootc diff --git a/test/resources/microshift-host.resource b/test/resources/microshift-host.resource index ed3986c405..a61b5fa3e4 100644 --- a/test/resources/microshift-host.resource +++ b/test/resources/microshift-host.resource @@ -99,6 +99,11 @@ Is System OSTree ... sudo=True return_stderr=False return_stdout=False return_rc=True IF ${rc} == 0 RETURN ${TRUE} ELSE RETURN ${FALSE} +System Should Not Be Ostree + [Documentation] Make sure we run on a non-ostree system + ${is_ostree}= Is System OSTree + Should Not Be True ${is_ostree} + System Should Be Rebooted [Documentation] Assert if the system rebooted comparing the current and provided boot identifier [Arguments] ${old_bootid} diff --git a/test/resources/microshift-rpm.resource b/test/resources/microshift-rpm.resource index 7f97d3f1b1..3335a64ca4 100644 --- a/test/resources/microshift-rpm.resource +++ b/test/resources/microshift-rpm.resource @@ -107,3 +107,11 @@ Verify MicroShift RPM Install # Checks only config files from RPM packages excluding modification time check Command Should Work rpm -qa microshift\* | xargs -I {} bash -c 'echo {}; sudo rpm -V --configfiles --nomtime {}' + +Pull Secret Should Be Installed + [Documentation] Check that the kickstart file installed a pull secret for us + ${stdout} ${stderr} ${rc}= SSHLibrary.Execute Command + ... stat /etc/crio/openshift-pull-secret + ... sudo=True return_rc=True return_stderr=True return_stdout=True + Log Many ${stdout} ${stderr} + Should Be Equal As Integers 0 ${rc} diff --git a/test/scenarios-bootc/releases/el96-lrel@standard1.sh b/test/scenarios-bootc/releases/el96-lrel@standard1.sh index ec0b303b3d..d0b8ffd9a0 100644 --- a/test/scenarios-bootc/releases/el96-lrel@standard1.sh +++ b/test/scenarios-bootc/releases/el96-lrel@standard1.sh @@ -11,7 +11,7 @@ scenario_create_vms() { fi prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}" - launch_vm --boot_blueprint rhel96-bootc + launch_vm --boot_blueprint "${start_image}" } scenario_remove_vms() { diff --git a/test/scenarios-bootc/releases/el96-lrel@standard2.sh b/test/scenarios-bootc/releases/el96-lrel@standard2.sh index 9d441214de..ceac34c093 100644 --- a/test/scenarios-bootc/releases/el96-lrel@standard2.sh +++ b/test/scenarios-bootc/releases/el96-lrel@standard2.sh @@ -11,7 +11,7 @@ scenario_create_vms() { fi prepare_kickstart host1 kickstart-bootc.ks.template "${start_image}" - launch_vm --boot_blueprint rhel96-bootc + launch_vm --boot_blueprint "${start_image}" } scenario_remove_vms() { diff --git a/test/scenarios/presubmits/el96-src@rpm-install.sh b/test/scenarios/presubmits/el96-src@rpm-install.sh index 21576362a6..8cc976a807 100644 --- a/test/scenarios/presubmits/el96-src@rpm-install.sh +++ b/test/scenarios/presubmits/el96-src@rpm-install.sh @@ -112,5 +112,7 @@ scenario_run_tests() { --variable "SOURCE_REPO_URL:${source_repo_url}" \ --variable "TARGET_VERSION:${target_version}" \ --variable "PREVIOUS_MINOR_VERSION:${PREVIOUS_MINOR_VERSION}" \ - suites/rpm/install-and-upgrade-successful.robot + suites/rpm/install.robot \ + suites/rpm/remove.robot \ + suites/rpm/upgrade-successful.robot } diff --git a/test/scenarios/releases/el96@rpm-install-upgrade.sh b/test/scenarios/releases/el96@rpm-install-upgrade.sh new file mode 100644 index 0000000000..d9b8506c86 --- /dev/null +++ b/test/scenarios/releases/el96@rpm-install-upgrade.sh @@ -0,0 +1,117 @@ +#!/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 + +configure_microshift_mirror() { + local -r repo=$1 + + # `repo` might be empty if we install microshift from rhocp + if [[ -z "${repo}" ]] ; then + return + fi + + # `repo` might be an enabled repo from a released version instead + # of a mirror. + if [[ ! "${repo}" =~ ^http ]]; then + return + fi + + local -r tmp_file=$(mktemp) + tee "${tmp_file}" >/dev/null </dev/null </dev/null </dev/null <