diff --git a/test/image-blueprints-bootc/layer4-upstream/group1/cos10-test-agent.containerfile b/test/image-blueprints-bootc/layer4-upstream/group1/cos10-test-agent.containerfile new file mode 100644 index 0000000000..8f86b0578c --- /dev/null +++ b/test/image-blueprints-bootc/layer4-upstream/group1/cos10-test-agent.containerfile @@ -0,0 +1,20 @@ +FROM quay.io/centos-bootc/centos-bootc:stream10 + +# Build arguments +ARG USHIFT_RPM_REPO_NAME=microshift-local +ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME + +# Copy the MicroShift repository contents +COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH + +# Copy repository configuration +COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo /etc/yum.repos.d/ + +# Print repository configuration contents. +# Install test agent and cleanup. +RUN dnf repoinfo --enabled && \ + dnf install -y microshift-test-agent && \ + systemctl enable microshift-test-agent && \ + rm -vf /etc/yum.repos.d/microshift-*.repo && \ + rm -rvf $USHIFT_RPM_REPO_PATH && \ + dnf clean all diff --git a/test/image-blueprints-bootc/layer4-upstream/group1/cos9-test-agent.containerfile b/test/image-blueprints-bootc/layer4-upstream/group1/cos9-test-agent.containerfile new file mode 100644 index 0000000000..a5e73cb0eb --- /dev/null +++ b/test/image-blueprints-bootc/layer4-upstream/group1/cos9-test-agent.containerfile @@ -0,0 +1,20 @@ +FROM quay.io/centos-bootc/centos-bootc:stream9 + +# Build arguments +ARG USHIFT_RPM_REPO_NAME=microshift-local +ARG USHIFT_RPM_REPO_PATH=/tmp/$USHIFT_RPM_REPO_NAME + +# Copy the MicroShift repository contents +COPY ./rpm-repos/$USHIFT_RPM_REPO_NAME $USHIFT_RPM_REPO_PATH + +# Copy repository configuration +COPY ./bootc-images/$USHIFT_RPM_REPO_NAME.repo /etc/yum.repos.d/ + +# Print repository configuration contents. +# Install test agent and cleanup. +RUN dnf repoinfo --enabled && \ + dnf install -y microshift-test-agent && \ + systemctl enable microshift-test-agent && \ + rm -vf /etc/yum.repos.d/microshift-*.repo && \ + rm -rvf $USHIFT_RPM_REPO_PATH && \ + dnf clean all diff --git a/test/image-blueprints-bootc/layer4-upstream/group1/centos10-bootc.image-bootc b/test/image-blueprints-bootc/layer4-upstream/group2/centos10-bootc.image-bootc similarity index 100% rename from test/image-blueprints-bootc/layer4-upstream/group1/centos10-bootc.image-bootc rename to test/image-blueprints-bootc/layer4-upstream/group2/centos10-bootc.image-bootc diff --git a/test/image-blueprints-bootc/layer4-upstream/group1/centos9-bootc.image-bootc b/test/image-blueprints-bootc/layer4-upstream/group2/centos9-bootc.image-bootc similarity index 100% rename from test/image-blueprints-bootc/layer4-upstream/group1/centos9-bootc.image-bootc rename to test/image-blueprints-bootc/layer4-upstream/group2/centos9-bootc.image-bootc diff --git a/test/image-blueprints-bootc/layer4-upstream/group1/cos10-bootc-source.containerfile b/test/image-blueprints-bootc/layer4-upstream/group2/cos10-bootc-source.containerfile similarity index 97% rename from test/image-blueprints-bootc/layer4-upstream/group1/cos10-bootc-source.containerfile rename to test/image-blueprints-bootc/layer4-upstream/group2/cos10-bootc-source.containerfile index 16676b28ee..7d47fb2347 100644 --- a/test/image-blueprints-bootc/layer4-upstream/group1/cos10-bootc-source.containerfile +++ b/test/image-blueprints-bootc/layer4-upstream/group2/cos10-bootc-source.containerfile @@ -1,4 +1,4 @@ -FROM quay.io/centos-bootc/centos-bootc:stream10 +FROM localhost/cos10-test-agent:latest # Build arguments ARG USHIFT_RPM_REPO_NAME=microshift-local diff --git a/test/image-blueprints-bootc/layer4-upstream/group1/cos9-bootc-source.containerfile b/test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source.containerfile similarity index 97% rename from test/image-blueprints-bootc/layer4-upstream/group1/cos9-bootc-source.containerfile rename to test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source.containerfile index e5fbf174f1..cd6ab4cd8b 100644 --- a/test/image-blueprints-bootc/layer4-upstream/group1/cos9-bootc-source.containerfile +++ b/test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source.containerfile @@ -1,4 +1,4 @@ -FROM quay.io/centos-bootc/centos-bootc:stream9 +FROM localhost/cos9-test-agent:latest # Build arguments ARG USHIFT_RPM_REPO_NAME=microshift-local diff --git a/test/image-blueprints-bootc/layer4-upstream/group3/cos10-bootc-source-isolated.containerfile b/test/image-blueprints-bootc/layer4-upstream/group3/cos10-bootc-source-isolated.containerfile new file mode 100644 index 0000000000..fc3fce6ab2 --- /dev/null +++ b/test/image-blueprints-bootc/layer4-upstream/group3/cos10-bootc-source-isolated.containerfile @@ -0,0 +1,17 @@ +FROM localhost/cos10-bootc-source:latest + +# Embed images based on contents of release-info RPMs +COPY --chmod=755 ./bootc-images/microshift-copy-images.sh /usr/bin/microshift-copy-images +RUN --mount=type=secret,id=pullsecret,dst=/run/secrets/pull-secret.json \ + images="$(jq -r ".images[]" /usr/share/microshift/release/release-"$(uname -m)".json)" ; \ + images="${images} quay.io/microshift/busybox:1.36" ; \ + IMAGE_PULL_LIST="${images}" /usr/bin/microshift-copy-images pull + +# Install a systemd drop-in unit to address the problem with image upgrades +# overwriting the container images in additional store. The workaround is to +# copy the images from the pre-loaded to the main container storage directory. +# In this case, it is not necessary to update /etc/containers/storage.conf with +# the additional store path. +# See https://issues.redhat.com/browse/RHEL-75827 +RUN mkdir -p /usr/lib/systemd/system/microshift.service.d +COPY --chmod=644 ./bootc-images/microshift-copy-images.conf /usr/lib/systemd/system/microshift.service.d/microshift-copy-images.conf diff --git a/test/image-blueprints-bootc/layer4-upstream/group2/cos10-bootc-source-optionals.containerfile b/test/image-blueprints-bootc/layer4-upstream/group3/cos10-bootc-source-optionals.containerfile similarity index 100% rename from test/image-blueprints-bootc/layer4-upstream/group2/cos10-bootc-source-optionals.containerfile rename to test/image-blueprints-bootc/layer4-upstream/group3/cos10-bootc-source-optionals.containerfile diff --git a/test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source-isolated.containerfile b/test/image-blueprints-bootc/layer4-upstream/group3/cos9-bootc-source-isolated.containerfile similarity index 100% rename from test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source-isolated.containerfile rename to test/image-blueprints-bootc/layer4-upstream/group3/cos9-bootc-source-isolated.containerfile diff --git a/test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source-optionals.containerfile b/test/image-blueprints-bootc/layer4-upstream/group3/cos9-bootc-source-optionals.containerfile similarity index 100% rename from test/image-blueprints-bootc/layer4-upstream/group2/cos9-bootc-source-optionals.containerfile rename to test/image-blueprints-bootc/layer4-upstream/group3/cos9-bootc-source-optionals.containerfile diff --git a/test/scenarios-bootc/upstream/cos10-src@greenboot.sh.disabled b/test/scenarios-bootc/upstream/cos10-src@greenboot.sh.disabled new file mode 100644 index 0000000000..b52031e0ad --- /dev/null +++ b/test/scenarios-bootc/upstream/cos10-src@greenboot.sh.disabled @@ -0,0 +1,16 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +scenario_create_vms() { + prepare_kickstart host1 kickstart-bootc.ks.template cos10-bootc-source + launch_vm --boot_blueprint centos10-bootc +} + +scenario_remove_vms() { + remove_vm host1 +} + +scenario_run_tests() { + run_tests host1 suites/greenboot/ +} diff --git a/test/scenarios-bootc/upstream/cos10-src@isolated-net.sh b/test/scenarios-bootc/upstream/cos10-src@isolated-net.sh new file mode 100644 index 0000000000..4f5bb7315b --- /dev/null +++ b/test/scenarios-bootc/upstream/cos10-src@isolated-net.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +# Redefine network-related settings to use the isolated network bridge +VM_BRIDGE_IP="$(get_vm_bridge_ip "${VM_ISOLATED_NETWORK}")" +# shellcheck disable=SC2034 # used elsewhere +MIRROR_REGISTRY_URL="${VM_BRIDGE_IP}:${MIRROR_REGISTRY_PORT}/microshift" + +scenario_create_vms() { + prepare_kickstart host1 kickstart-bootc-isolated.ks.template cos10-bootc-source-isolated + # Use the isolated network when creating a VM + launch_vm --boot_blueprint centos10-bootc --network "${VM_ISOLATED_NETWORK}" +} + +scenario_remove_vms() { + remove_vm host1 +} + +scenario_run_tests() { + run_tests host1 suites/network/isolated-network.robot +} diff --git a/test/scenarios-bootc/upstream/cos10-src@multi-nic.sh b/test/scenarios-bootc/upstream/cos10-src@multi-nic.sh new file mode 100644 index 0000000000..36a2db12e1 --- /dev/null +++ b/test/scenarios-bootc/upstream/cos10-src@multi-nic.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +scenario_create_vms() { + prepare_kickstart host1 kickstart-bootc.ks.template cos10-bootc-source + # Using multus as secondary network to have 2 nics in different networks. + launch_vm --boot_blueprint centos10-bootc --network default,"${VM_MULTUS_NETWORK}" +} + +scenario_remove_vms() { + remove_vm host1 +} + +scenario_run_tests() { + local -r vmname=$(full_vm_name host1) + local -r vm_ip1=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | head -1) + local -r vm_ip2=$("${ROOTDIR}/scripts/devenv-builder/manage-vm.sh" ip -n "${vmname}" | tail -1) + + run_tests host1 \ + --variable "USHIFT_HOST_IP1:${vm_ip1}" \ + --variable "USHIFT_HOST_IP2:${vm_ip2}" \ + suites/network/multi-nic.robot +} diff --git a/test/scenarios-bootc/upstream/cos9-src@greenboot.sh b/test/scenarios-bootc/upstream/cos9-src@greenboot.sh.disabled similarity index 100% rename from test/scenarios-bootc/upstream/cos9-src@greenboot.sh rename to test/scenarios-bootc/upstream/cos9-src@greenboot.sh.disabled