diff --git a/test/bin/common_versions.sh b/test/bin/common_versions.sh index 3491e51d61..e3ff5f1fe0 100644 --- a/test/bin/common_versions.sh +++ b/test/bin/common_versions.sh @@ -123,6 +123,9 @@ export RHOCP_MINOR_Y2=18 # See https://github.com/vmware-tanzu/sonobuoy/releases. export CNCF_SONOBUOY_VERSION=v0.57.3 +# The current version of the microshift-gitops package. +export GITOPS_VERSION=1.16 + # The brew release versions needed for release regression testing BREW_Y0_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}-zstream/${UNAME_M}/")" BREW_Y1_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${PREVIOUS_MINOR_VERSION}-zstream/${UNAME_M}/")" diff --git a/test/image-blueprints-bootc/layer3-periodic/group2/rhel96-bootc-source-gitops.containerfile b/test/image-blueprints-bootc/layer3-periodic/group2/rhel96-bootc-source-gitops.containerfile new file mode 100644 index 0000000000..7294382846 --- /dev/null +++ b/test/image-blueprints-bootc/layer3-periodic/group2/rhel96-bootc-source-gitops.containerfile @@ -0,0 +1,11 @@ +FROM localhost/rhel96-bootc-source:latest + +# Copy repository configuration +COPY ./bootc-images/microshift-gitops.repo \ + /etc/yum.repos.d/ + +# Print repository configuration contents. +# Install MicroShift and cleanup. +RUN dnf install -y microshift-gitops && \ + rm -vf /etc/yum.repos.d/microshift-*.repo && \ + dnf clean all diff --git a/test/package-sources-bootc/microshift-gitops.repo b/test/package-sources-bootc/microshift-gitops.repo new file mode 100644 index 0000000000..21e8ff6c91 --- /dev/null +++ b/test/package-sources-bootc/microshift-gitops.repo @@ -0,0 +1,10 @@ +[microshift-gitops] +name = Red Hat OpenShift GitOps {{ .Env.GITOPS_VERSION }} for RHEL 9 {{ .Env.UNAME_M }} (RPMs) +baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/{{ .Env.UNAME_M }}/gitops/{{ .Env.GITOPS_VERSION }}/os +enabled = 1 +gpgcheck = 1 +gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release +sslverify = 1 +sslcacert = /etc/rhsm/ca/redhat-uep.pem +sslclientkey = {{ .Env.SSL_CLIENT_KEY_FILE }} +sslclientcert = {{ .Env.SSL_CLIENT_CERT_FILE }} diff --git a/test/scenarios-bootc/periodics/el96-src@gitops.sh b/test/scenarios-bootc/periodics/el96-src@gitops.sh new file mode 100644 index 0000000000..0778c3c73d --- /dev/null +++ b/test/scenarios-bootc/periodics/el96-src@gitops.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Sourced from scenario.sh and uses functions defined there. + +scenario_create_vms() { + prepare_kickstart host1 kickstart-bootc.ks.template rhel96-bootc-source-gitops + launch_vm --boot_blueprint rhel96-bootc +} + +scenario_remove_vms() { + remove_vm host1 +} + +scenario_run_tests() { + run_tests host1 \ + suites/gitops/ +} diff --git a/test/suites/gitops/gitops.robot b/test/suites/gitops/gitops.robot new file mode 100644 index 0000000000..0802866a74 --- /dev/null +++ b/test/suites/gitops/gitops.robot @@ -0,0 +1,26 @@ +*** Settings *** +Documentation MicroShift GitOps tests + +Resource ../../resources/microshift-process.resource + +Suite Setup Setup Suite With Namespace +Suite Teardown Teardown Suite With Namespace + + +*** Variables *** +${WORKLOAD_URL} https://raw.githubusercontent.com/argoproj/argocd-example-apps/refs/heads/master/guestbook/guestbook-ui-deployment.yaml + + +*** Test Cases *** +Verify GitOps Pods Start Correctly + [Documentation] Waits for pods to enter a running state + + Wait Until Keyword Succeeds 2min 10s + ... All Pods Should Be Running openshift-gitops + +Verify Workload Deployed Correctly + [Documentation] Deploys workload and waits for ready status + + Oc Apply -f ${WORKLOAD_URL} -n ${NAMESPACE} + Wait Until Keyword Succeeds 5min 10s + ... Named Deployment Should Be Available guestbook-ui