diff --git a/assets/components/openshift-router/deployment.yaml b/assets/components/openshift-router/deployment.yaml index 4a7520c32e..af1f48f67f 100644 --- a/assets/components/openshift-router/deployment.yaml +++ b/assets/components/openshift-router/deployment.yaml @@ -219,7 +219,7 @@ spec: args: - -v=4 {{- if and .AccessLoggingEnabled (not .AccessLoggingSyslogAddress) }} - - name: access-logs + - name: logs imagePullPolicy: IfNotPresent terminationMessagePolicy: FallbackToLogsOnError image: '{{ .ReleaseImage.haproxy_router }}' diff --git a/scripts/auto-rebase/manifests_patches/011-ingress-deployment-access-logging.patch b/scripts/auto-rebase/manifests_patches/011-ingress-deployment-access-logging.patch index 8bb6df79c5..b9517e5751 100644 --- a/scripts/auto-rebase/manifests_patches/011-ingress-deployment-access-logging.patch +++ b/scripts/auto-rebase/manifests_patches/011-ingress-deployment-access-logging.patch @@ -78,7 +78,7 @@ index 916e4b601..9261e3700 100644 args: - -v=4 + {{- if and .AccessLoggingEnabled (not .AccessLoggingSyslogAddress) }} -+ - name: access-logs ++ - name: logs + imagePullPolicy: IfNotPresent + terminationMessagePolicy: FallbackToLogsOnError + image: '{{ .ReleaseImage.haproxy_router }}' diff --git a/test/bin/common_versions.sh b/test/bin/common_versions.sh index a16fccd1c9..294a021ff9 100644 --- a/test/bin/common_versions.sh +++ b/test/bin/common_versions.sh @@ -136,7 +136,7 @@ export BREW_RC_RELEASE_VERSION export BREW_EC_RELEASE_VERSION # Set the release type to ec, rc or zstream -LATEST_RELEASE_TYPE="rc" +LATEST_RELEASE_TYPE="nightly" export LATEST_RELEASE_TYPE BREW_LREL_RELEASE_VERSION="${BREW_EC_RELEASE_VERSION}" @@ -146,4 +146,4 @@ export BREW_LREL_RELEASE_VERSION OPENSHIFT_TESTS_PRIVATE_REPO_BRANCH="release-4.${MINOR_VERSION}" OPENSHIFT_TESTS_PRIVATE_REPO_COMMIT="b6418066dc1c0fc55f8d0213792041770a0baf80" export OPENSHIFT_TESTS_PRIVATE_REPO_BRANCH -export OPENSHIFT_TESTS_PRIVATE_REPO_COMMIT \ No newline at end of file +export OPENSHIFT_TESTS_PRIVATE_REPO_COMMIT diff --git a/test/bin/scenario.sh b/test/bin/scenario.sh index 42ce152f9c..b0a6e82a02 100755 --- a/test/bin/scenario.sh +++ b/test/bin/scenario.sh @@ -894,13 +894,14 @@ configure_vm_firewall() { # Function to report the full version of locally built RPMs, e.g. "4.17.0" local_rpm_version() { - if [ ! -d "${LOCAL_REPO}" ]; then + REPO="${$1:-LOCAL_REPO}" + if [ ! -d "${REPO}" ]; then "${TESTDIR}/bin/build_rpms.sh" fi - local -r release_info_rpm=$(find "${LOCAL_REPO}" -name 'microshift-release-info-*.rpm' | sort | tail -n 1) + local -r release_info_rpm=$(find "${REPO}" -name 'microshift-release-info-*.rpm' | sort | tail -n 1) if [ -z "${release_info_rpm}" ]; then - error "Failed to find microshift-release-info RPM in ${LOCAL_REPO}" + error "Failed to find microshift-release-info RPM in ${REPO}" exit 1 fi rpm -q --queryformat '%{version}-%{release}' "${release_info_rpm}" 2>/dev/null diff --git a/test/image-blueprints-bootc/layer1-base/group2/rhel94-bootc.image-bootc b/test/image-blueprints-bootc/layer1-base/group2/rhel94-bootc.image-bootc deleted file mode 100644 index 60c1f57ef5..0000000000 --- a/test/image-blueprints-bootc/layer1-base/group2/rhel94-bootc.image-bootc +++ /dev/null @@ -1 +0,0 @@ -registry.redhat.io/rhel9-eus/rhel-9.4-bootc:9.4 \ No newline at end of file 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-nightly-with-optional.image-bootc b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-nightly-with-optional.image-bootc new file mode 100644 index 0000000000..266a2dffa5 --- /dev/null +++ b/test/image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-nightly-with-optional.image-bootc @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_NIGHTLY_RELEASE_VERSION" "" -}} +localhost/rhel96-bootc-brew-nightly-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/image-blueprints/layer1-base/group4/rhel94.image-installer b/test/image-blueprints/layer1-base/group5/rhel94.image-installer similarity index 100% rename from test/image-blueprints/layer1-base/group4/rhel94.image-installer rename to test/image-blueprints/layer1-base/group5/rhel94.image-installer diff --git a/test/image-blueprints/layer1-base/group5/rhel96-brew-ec-with-optionals.image-installer b/test/image-blueprints/layer1-base/group5/rhel96-brew-ec-with-optionals.image-installer new file mode 100644 index 0000000000..3bd3c6e4ff --- /dev/null +++ b/test/image-blueprints/layer1-base/group5/rhel96-brew-ec-with-optionals.image-installer @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_EC_RELEASE_VERSION" "" -}} +rhel-9.6-microshift-brew-optionals-4.{{ .Env.MINOR_VERSION}}-ec +{{- end -}} diff --git a/test/image-blueprints/layer1-base/group5/rhel96-brew-nightly-with-optionals.image-installer b/test/image-blueprints/layer1-base/group5/rhel96-brew-nightly-with-optionals.image-installer new file mode 100644 index 0000000000..063844268f --- /dev/null +++ b/test/image-blueprints/layer1-base/group5/rhel96-brew-nightly-with-optionals.image-installer @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_NIGHTLY_RELEASE_VERSION" "" -}} +rhel-9.6-microshift-brew-optionals-4.{{ .Env.MINOR_VERSION}}-nightly +{{- end -}} diff --git a/test/image-blueprints/layer1-base/group5/rhel96-brew-rc-with-optionals.image-installer b/test/image-blueprints/layer1-base/group5/rhel96-brew-rc-with-optionals.image-installer new file mode 100644 index 0000000000..9b5c067c0c --- /dev/null +++ b/test/image-blueprints/layer1-base/group5/rhel96-brew-rc-with-optionals.image-installer @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_RC_RELEASE_VERSION" "" -}} +rhel-9.6-microshift-brew-optionals-4.{{ .Env.MINOR_VERSION}}-rc +{{- end -}} diff --git a/test/image-blueprints/layer1-base/group5/rhel96-brew-zstream-with-optionals.image-installer b/test/image-blueprints/layer1-base/group5/rhel96-brew-zstream-with-optionals.image-installer new file mode 100644 index 0000000000..8f278b97e5 --- /dev/null +++ b/test/image-blueprints/layer1-base/group5/rhel96-brew-zstream-with-optionals.image-installer @@ -0,0 +1,3 @@ +{{- if env.Getenv "BREW_Y0_RELEASE_VERSION" "" -}} +rhel-9.6-microshift-brew-optionals-4.{{ .Env.MINOR_VERSION }}-zstream +{{- end -}} diff --git a/test/image-blueprints/layer1-base/group4/rhel96-microshift-previous-minor.image-installer b/test/image-blueprints/layer1-base/group5/rhel96-microshift-previous-minor.image-installer similarity index 100% rename from test/image-blueprints/layer1-base/group4/rhel96-microshift-previous-minor.image-installer rename to test/image-blueprints/layer1-base/group5/rhel96-microshift-previous-minor.image-installer diff --git a/test/image-blueprints/layer1-base/group4/rhel96.image-installer b/test/image-blueprints/layer1-base/group5/rhel96.image-installer similarity index 100% rename from test/image-blueprints/layer1-base/group4/rhel96.image-installer rename to test/image-blueprints/layer1-base/group5/rhel96.image-installer 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-lrel@standard1.sh b/test/scenarios/releases/el96-lrel@standard1.sh deleted file mode 100644 index 03ddb91ce7..0000000000 --- a/test/scenarios/releases/el96-lrel@standard1.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# Sourced from scenario.sh and uses functions defined there. - -start_image="rhel-9.6-microshift-brew-optionals-4.${MINOR_VERSION}-${LATEST_RELEASE_TYPE}" - -scenario_create_vms() { - if ! does_commit_exist "${start_image}"; then - echo "Image '${start_image}' not found - skipping test" - return 0 - fi - - prepare_kickstart host1 kickstart.ks.template "${start_image}" - launch_vm -} - -scenario_remove_vms() { - if ! does_commit_exist "${start_image}"; then - echo "Image '${start_image}' not found - skipping test" - return 0 - fi - - remove_vm host1 -} - -scenario_run_tests() { - if ! does_commit_exist "${start_image}"; then - echo "Image '${start_image}' not found - skipping test" - return 0 - fi - - run_tests host1 \ - --variable "EXPECTED_OS_VERSION:9.6" \ - suites/standard1/ suites/selinux/validate-selinux-policy.robot -} diff --git a/test/scenarios/releases/el96-lrel@standard2.sh b/test/scenarios/releases/el96-lrel@standard2.sh deleted file mode 100644 index 154cdffe5c..0000000000 --- a/test/scenarios/releases/el96-lrel@standard2.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# Sourced from scenario.sh and uses functions defined there. - -start_image="rhel-9.6-microshift-brew-optionals-4.${MINOR_VERSION}-${LATEST_RELEASE_TYPE}" - -scenario_create_vms() { - if ! does_commit_exist "${start_image}"; then - echo "Image '${start_image}' not found - skipping test" - return 0 - fi - - prepare_kickstart host1 kickstart.ks.template "${start_image}" - launch_vm -} - -scenario_remove_vms() { - if ! does_commit_exist "${start_image}"; then - echo "Image '${start_image}' not found - skipping test" - return 0 - fi - - remove_vm host1 -} - -scenario_run_tests() { - if ! does_commit_exist "${start_image}"; then - echo "Image '${start_image}' not found - skipping test" - return 0 - fi - - run_tests host1 suites/standard2/ -} 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 </dev/null </dev/null <