Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/devenv-builder/configure-vm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,14 @@ fi
OCPVERSION="4.${LATEST_RHOCP_MINOR}"

if ${RHEL_SUBSCRIPTION}; then
OCPPREVVERSION="4.$((LATEST_RHOCP_MINOR-1))"
OSVERSION=$(awk -F: '{print $5}' /etc/system-release-cpe)
sudo subscription-manager config --rhsm.manage_repos=1

sudo subscription-manager repos \
--enable "rhocp-${OCPVERSION}-for-rhel-${OSVERSION}-$(uname -m)-rpms"
sudo subscription-manager repos \
--enable "rhocp-${OCPPREVVERSION}-for-rhel-${OSVERSION}-$(uname -m)-rpms"

if ! ${RHEL_BETA_VERSION} ; then
sudo subscription-manager repos \
Expand Down
3 changes: 3 additions & 0 deletions test/scenarios/el94-src@rpm-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ scenario_run_tests() {
# name, so should include the major and minor version number.
local -r dependency_version="4.$("${ROOTDIR}/scripts/get-latest-rhocp-repo.sh")"

# Force enable the previous minor version repo to pull microshift-*-4.15
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${previous_minor_version}-for-rhel-9-\$(uname -m)-rpms"

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${source_repo_url}" \
Expand Down
15 changes: 15 additions & 0 deletions test/suites/rpm/install-and-upgrade-successful.robot
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ ${TARGET_VERSION} ${EMPTY}
${DEPENDENCY_VERSION} ${EMPTY}
# Optional URL for repo for previous minor version
${PREVIOUS_VERSION_REPO_URL} ${EMPTY}
# Crun configuration
${CRIO_CONFIG} SEPARATOR=\n
... [crio.runtime.runtimes.crun]
... runtime_path = ""
... runtime_type = "oci"
... runtime_root = "/run/crun"
... runtime_config_path = ""
... monitor_path = ""


*** Test Cases ***
Expand Down Expand Up @@ -68,6 +76,13 @@ Upgrade From Previous Version
END
${version}= MicroShift Version
Should Be Equal As Integers ${version.minor} ${PREVIOUS_MINOR_VERSION}
# Since 4.15 RPMs do not restrict the crio max version, and crio 1.29 (which is the
# version in 4.16 repo) includes a breaking change in the default config(that was fixed
# in 4.16 for microshift), we need to manually configure it here. A proper fix would be
# to have microshift 4.15 install crio<=1.28, but here we can work around it by copying
# the file.
# This is a temporary fix until 4.15 RPMs set their dependencies with min and max versions.
Upload String To File ${CRIO_CONFIG} /etc/crio/crio.conf.d/00-crio-crun.conf
Start MicroShift
Wait For MicroShift
Install MicroShift RPM Packages From Repo ${SOURCE_REPO_URL} ${TARGET_VERSION}
Expand Down