Skip to content

Commit 5c4363f

Browse files
committed
Add el94 bootc scenarios
1 parent 9af9ccd commit 5c4363f

File tree

9 files changed

+257
-0
lines changed

9 files changed

+257
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM localhost/rhel94-bootc-source:latest
2+
3+
# Build arguments
4+
ARG PREVIOUS_MINOR_VERSION=15
5+
ARG USHIFT_RPM_REPO_NAME=microshift-local
6+
ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME
7+
8+
# Copy the MicroShift repository contents
9+
ADD $USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH
10+
11+
# MicroShift local RPM repository
12+
RUN printf "\
13+
[microshift-local]\n\
14+
name=MicroShift Local Repository\n\
15+
baseurl=$USHIFT_RPM_REPO_PATH\n\
16+
enabled=1\n\
17+
gpgcheck=0\n\
18+
skip_if_unavailable=0\n" > "/etc/yum.repos.d/microshift-local.repo"
19+
20+
# OpenShift Mirror beta RPM repository for MicroShift dependencies
21+
# Only the released previous minor version is guaranteed to be available
22+
RUN printf "\
23+
[openshift-mirror-beta]\n\
24+
name=OpenShift Mirror Beta Repository\n\
25+
baseurl=https://mirror.openshift.com/pub/openshift-v4/$(uname -m)/dependencies/rpms/4.${PREVIOUS_MINOR_VERSION}-el9-beta/\n\
26+
enabled=1\n\
27+
gpgcheck=0\n\
28+
skip_if_unavailable=0\n" > "/etc/yum.repos.d/openshift-mirror-beta.repo"
29+
30+
# Install MicroShift optional RPMs
31+
RUN dnf install -y microshift-olm microshift-multus && \
32+
rm -rf $USHIFT_RPM_REPO_PATH && \
33+
rm -f /etc/yum.repos.d/{microshift,openshift}*.repo && \
34+
dnf clean all
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
scenario_create_vms() {
6+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
7+
# Using centos9 is necessary for getting the latest anaconda.
8+
# It is a temporary workaround until rhel-9.4.iso build is available.
9+
launch_vm host1 centos9 "" "" "" "" "" "" "1"
10+
11+
# Open the firewall ports. Other scenarios get this behavior by
12+
# embedding settings in the blueprint, but there is no blueprint
13+
# for this scenario. We need do this step before running the RF
14+
# suite so that suite can assume it can reach all of the same
15+
# ports as for any other test.
16+
configure_vm_firewall host1
17+
}
18+
19+
scenario_remove_vms() {
20+
remove_vm host1
21+
}
22+
23+
scenario_run_tests() {
24+
run_tests host1 suites/backup/backup-restore-on-reboot.robot
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
scenario_create_vms() {
6+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
7+
# Using centos9 is necessary for getting the latest anaconda.
8+
# It is a temporary workaround until rhel-9.4.iso build is available.
9+
launch_vm host1 centos9 "" "" "" "" "" "" "1"
10+
11+
# Open the firewall ports. Other scenarios get this behavior by
12+
# embedding settings in the blueprint, but there is no blueprint
13+
# for this scenario. We need do this step before running the RF
14+
# suite so that suite can assume it can reach all of the same
15+
# ports as for any other test.
16+
configure_vm_firewall host1
17+
}
18+
19+
scenario_remove_vms() {
20+
remove_vm host1
21+
}
22+
23+
scenario_run_tests() {
24+
run_tests host1 suites/backup/backups.robot
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Sourced from cleanup_scenario.sh and uses functions defined there.
4+
5+
scenario_create_vms() {
6+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
7+
# Using centos9 is necessary for getting the latest anaconda.
8+
# It is a temporary workaround until rhel-9.4.iso build is available.
9+
launch_vm host1 centos9 "" "" "" "" "" "" "1"
10+
11+
# Open the firewall ports. Other scenarios get this behavior by
12+
# embedding settings in the blueprint, but there is no blueprint
13+
# for this scenario. We need do this step before running the RF
14+
# suite so that suite can assume it can reach all of the same
15+
# ports as for any other test.
16+
configure_vm_firewall host1
17+
}
18+
19+
scenario_remove_vms() {
20+
remove_vm host1
21+
}
22+
23+
scenario_run_tests() {
24+
run_tests host1 suites/greenboot/
25+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
# NOTE: Unlike most suites, these tests rely on being run IN ORDER to
6+
# ensure the host is in a good state at the start of each test. We
7+
# could have separated them and run them as separate scenarios, but
8+
# did not want to spend the resources on a new VM.
9+
export TEST_RANDOMIZATION=none
10+
11+
scenario_create_vms() {
12+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
13+
# Using centos9 is necessary for getting the latest anaconda.
14+
# It is a temporary workaround until rhel-9.4.iso build is available.
15+
launch_vm host1 centos9 "" "" "" "" "" "" "1"
16+
17+
# Open the firewall ports. Other scenarios get this behavior by
18+
# embedding settings in the blueprint, but there is no blueprint
19+
# for this scenario. We need do this step before running the RF
20+
# suite so that suite can assume it can reach all of the same
21+
# ports as for any other test.
22+
configure_vm_firewall host1
23+
}
24+
25+
scenario_remove_vms() {
26+
remove_vm host1
27+
}
28+
29+
scenario_run_tests() {
30+
run_tests host1 suites/logscan/
31+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
scenario_create_vms() {
6+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
7+
# Using centos9 is necessary for getting the latest anaconda.
8+
# It is a temporary workaround until rhel-9.4.iso build is available.
9+
launch_vm host1 centos9 "" "" "" "" 2 "" "1"
10+
11+
# Open the firewall ports. Other scenarios get this behavior by
12+
# embedding settings in the blueprint, but there is no blueprint
13+
# for this scenario. We need do this step before running the RF
14+
# suite so that suite can assume it can reach all of the same
15+
# ports as for any other test.
16+
configure_vm_firewall host1
17+
}
18+
19+
scenario_remove_vms() {
20+
remove_vm host1
21+
}
22+
23+
scenario_run_tests() {
24+
local -r vmname=$(full_vm_name host1)
25+
local -r vm_ip1=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -1)
26+
local -r vm_ip2=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | tail -1)
27+
28+
run_tests host1 \
29+
--variable "USHIFT_HOST_IP1:${vm_ip1}" \
30+
--variable "USHIFT_HOST_IP2:${vm_ip2}" \
31+
suites/network/multi-nic.robot
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
# Redefine network-related settings to use the dedicated network bridge
6+
VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_MULTUS_NETWORK}")"
7+
# shellcheck disable=SC2034 # used elsewhere
8+
WEB_SERVER_URL="http://${VM_BRIDGE_IP}:${WEB_SERVER_PORT}"
9+
10+
scenario_create_vms() {
11+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source-optionals
12+
# Using centos9 is necessary for getting the latest anaconda.
13+
# It is a temporary workaround until rhel-9.4.iso build is available.
14+
# Two nics - one for macvlan, another for ipvlan (they cannot enslave the same interface)
15+
launch_vm host1 centos9 "${VM_MULTUS_NETWORK}" "" "" "" "2" "" "1"
16+
17+
# Open the firewall ports. Other scenarios get this behavior by
18+
# embedding settings in the blueprint, but there is no blueprint
19+
# for this scenario. We need do this step before running the RF
20+
# suite so that suite can assume it can reach all of the same
21+
# ports as for any other test.
22+
configure_vm_firewall host1
23+
}
24+
25+
scenario_remove_vms() {
26+
remove_vm host1
27+
}
28+
29+
scenario_run_tests() {
30+
run_tests host1 suites/optional/
31+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
# Override the default test timeout of 30m
6+
# shellcheck disable=SC2034 # used elsewhere
7+
TEST_EXECUTION_TIMEOUT="1.5h"
8+
9+
scenario_create_vms() {
10+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
11+
# Using centos9 is necessary for getting the latest anaconda.
12+
# It is a temporary workaround until rhel-9.4.iso build is available.
13+
launch_vm host1 centos9 "" "" "" "" "" "" "1"
14+
15+
# Open the firewall ports. Other scenarios get this behavior by
16+
# embedding settings in the blueprint, but there is no blueprint
17+
# for this scenario. We need do this step before running the RF
18+
# suite so that suite can assume it can reach all of the same
19+
# ports as for any other test.
20+
configure_vm_firewall host1
21+
}
22+
23+
scenario_remove_vms() {
24+
remove_vm host1
25+
}
26+
27+
scenario_run_tests() {
28+
run_tests host1 suites/osconfig
29+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# Sourced from scenario.sh and uses functions defined there.
4+
5+
scenario_create_vms() {
6+
prepare_kickstart host1 kickstart-bootc.ks.template rhel94-bootc-source
7+
# Using centos9 is necessary for getting the latest anaconda.
8+
# It is a temporary workaround until rhel-9.4.iso build is available.
9+
launch_vm host1 centos9 "" "" "" "" "" "" "1"
10+
11+
# Open the firewall ports. Other scenarios get this behavior by
12+
# embedding settings in the blueprint, but there is no blueprint
13+
# for this scenario. We need do this step before running the RF
14+
# suite so that suite can assume it can reach all of the same
15+
# ports as for any other test.
16+
configure_vm_firewall host1
17+
}
18+
19+
scenario_remove_vms() {
20+
remove_vm host1
21+
}
22+
23+
scenario_run_tests() {
24+
run_tests host1 suites/storage/
25+
}

0 commit comments

Comments
 (0)