Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
018fee4
add releases scenarios: RPM installation and ISO installation
agullon Sep 1, 2025
a91b88d
move image-installer and image-bootc files to a next layer
agullon Sep 1, 2025
e6c6065
set temp s3 bucket for testing
agullon Sep 2, 2025
7e90ac0
fix aws bucket name
agullon Sep 2, 2025
303dde9
remove no needed image-installer files
agullon Sep 2, 2025
1754d9e
fix set default var
agullon Sep 3, 2025
02f3411
remove group 5 from ostree images
agullon Sep 3, 2025
9c14ef6
modify rpm scenarios to install from RPM and run standard suites
agullon Sep 3, 2025
814518d
set target version for rpm RF tests
agullon Sep 3, 2025
83cc265
add BREW_LREL_RELEASE_VERSION var
agullon Sep 3, 2025
5bfa622
split install and remove microshift into 2 RF tests
agullon Sep 3, 2025
eee238b
removed blank line
agullon Sep 3, 2025
a5b04b8
install rhel 9.6 VM
agullon Sep 3, 2025
7cbb164
set correct target version for rpm-install-upgrade test
agullon Sep 4, 2025
481eb0b
OCPBUGS-60833: Fix router access logs container name
agullon Sep 4, 2025
80a3a7d
Merge branch 'main' into USHIFT-6072
agullon Sep 22, 2025
d19492b
remove no needed centos9 image
agullon Sep 22, 2025
452078a
set nightly as last lrel for testing
agullon Sep 22, 2025
35fbf83
Merge remote-tracking branch 'agullon/USHIFT-6085' into USHIFT-6072
agullon Oct 2, 2025
25d3a95
fix lrel version
agullon Oct 2, 2025
ae9c700
remove nightly bootc image
agullon Oct 2, 2025
c5e947f
revert temp AWS S3 bucket name
agullon Oct 2, 2025
0f2902e
Merge branch 'main' into USHIFT-6072
agullon Oct 3, 2025
4603e0b
remove duplicated function to common resource file
agullon Oct 3, 2025
2296145
add missing trailing blank line at the end of file
agullon Oct 3, 2025
6b89620
remove not used image
agullon Oct 3, 2025
debf22b
remove check pull secret keyword from remove MicroShift test
agullon Oct 3, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if env.Getenv "BREW_EC_RELEASE_VERSION" "" -}}
localhost/rhel96-bootc-brew-ec-with-optional:latest
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if env.Getenv "BREW_RC_RELEASE_VERSION" "" -}}
localhost/rhel96-bootc-brew-rc-with-optional:latest
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{{- if env.Getenv "BREW_Y0_RELEASE_VERSION" "" -}}
localhost/rhel96-bootc-brew-zstream-with-optional:latest
{{- end }}
5 changes: 5 additions & 0 deletions test/resources/microshift-host.resource
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
8 changes: 8 additions & 0 deletions test/resources/microshift-rpm.resource
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt this implied in a MicroShift start and wait? If there is no pull secret no images are pulled (unless embedded, but this is not one of those tests) and MicroShift can not start.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is. But be aware this keyword is executed before MicroShift is installed, so it's a pre-check to abort MicroShift installation if no pull secret is present. So I think we should keep this keyword.

[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}
2 changes: 1 addition & 1 deletion test/scenarios-bootc/releases/el96-lrel@standard1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion test/scenarios-bootc/releases/el96-lrel@standard2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
4 changes: 3 additions & 1 deletion test/scenarios/presubmits/el96-src@rpm-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
agullon marked this conversation as resolved.
}
117 changes: 117 additions & 0 deletions test/scenarios/releases/el96@rpm-install-upgrade.sh
Original file line number Diff line number Diff line change
@@ -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 <<EOF
[microshift-mirror-rpms]
name=MicroShift Mirror
baseurl=${repo}
enabled=1
gpgcheck=0
skip_if_unavailable=0
EOF
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}"
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/microshift-mirror-rpms.repo"
rm -f "${tmp_file}"
}

configure_rhocp_repo() {
local -r rhocp=$1
local -r version=$2

# The repository may be empty if the beta mirror is not up yet
if [[ -z "${rhocp}" ]] ; then
return
fi

if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
elif [[ "${rhocp}" =~ ^http ]]; then
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
local -r tmp_file=$(mktemp)

tee "${tmp_file}" >/dev/null <<EOF
[${ocp_repo_name}]
name=Beta rhocp RPMs for RHEL 9
baseurl=${rhocp}
enabled=1
gpgcheck=0
skip_if_unavailable=0
EOF
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}"
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/${ocp_repo_name}.repo"
rm -f "${tmp_file}"
fi
}

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm

# 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() {
remove_vm host1
}

scenario_run_tests() {
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}" "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1}" "${PREVIOUS_MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" "${PREVIOUS_MINOR_VERSION}"
configure_microshift_mirror "${PREVIOUS_RELEASE_REPO}"
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${repo_url}" \
--variable "TARGET_VERSION:${BREW_LREL_RELEASE_VERSION}" \
--variable "PREVIOUS_MINOR_VERSION:${PREVIOUS_MINOR_VERSION}" \
suites/rpm/install.robot \
Comment thread
agullon marked this conversation as resolved.
suites/rpm/remove.robot \
suites/rpm/upgrade-successful.robot
}
84 changes: 84 additions & 0 deletions test/scenarios/releases/el96@rpm-standard1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/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_rhocp_repo() {
local -r rhocp=$1
local -r version=$2

# The repository may be empty if the beta mirror is not up yet
if [[ -z "${rhocp}" ]] ; then
return
fi

if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
elif [[ "${rhocp}" =~ ^http ]]; then
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
local -r tmp_file=$(mktemp)

tee "${tmp_file}" >/dev/null <<EOF
[${ocp_repo_name}]
name=Beta rhocp RPMs for RHEL 9
baseurl=${rhocp}
enabled=1
gpgcheck=0
skip_if_unavailable=0
EOF
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}"
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/${ocp_repo_name}.repo"
rm -f "${tmp_file}"
fi
}

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm --boot_blueprint rhel-9.6
# 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() {
remove_vm host1
}

scenario_run_tests() {
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}" "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${repo_url}" \
--variable "TARGET_VERSION:${BREW_LREL_RELEASE_VERSION}" \
--variable "EXPECTED_OS_VERSION:9.6" \
suites/rpm/install.robot \
suites/standard1/ suites/selinux/validate-selinux-policy.robot
}
85 changes: 85 additions & 0 deletions test/scenarios/releases/el96@rpm-standard2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/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_rhocp_repo() {
local -r rhocp=$1
local -r version=$2

# The repository may be empty if the beta mirror is not up yet
if [[ -z "${rhocp}" ]] ; then
return
fi

if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms"
elif [[ "${rhocp}" =~ ^http ]]; then
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms"
local -r tmp_file=$(mktemp)

tee "${tmp_file}" >/dev/null <<EOF
[${ocp_repo_name}]
name=Beta rhocp RPMs for RHEL 9
baseurl=${rhocp}
enabled=1
gpgcheck=0
skip_if_unavailable=0
EOF
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}"
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/${ocp_repo_name}.repo"
rm -f "${tmp_file}"
fi
}

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm --boot_blueprint rhel-9.6

# 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() {
remove_vm host1
}

scenario_run_tests() {
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}" "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}"
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms"

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${repo_url}" \
--variable "TARGET_VERSION:${BREW_LREL_RELEASE_VERSION}" \
--variable "EXPECTED_OS_VERSION:9.6" \
suites/rpm/install.robot \
suites/standard2/
}
Loading