Skip to content

Commit 6abf3d6

Browse files
Merge pull request #5261 from vanhalenar/gitops
USHIFT-4528: microshift-gitops pre-release testing
2 parents 00a62dc + 7ac5bdc commit 6abf3d6

File tree

6 files changed

+83
-0
lines changed

6 files changed

+83
-0
lines changed

test/bin/common_versions.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ export RHOCP_MINOR_Y2=18
123123
# See https://github.com/vmware-tanzu/sonobuoy/releases.
124124
export CNCF_SONOBUOY_VERSION=v0.57.3
125125

126+
# The current version of the microshift-gitops package.
127+
export GITOPS_VERSION=1.16
128+
126129
# The brew release versions needed for release regression testing
127130
BREW_Y0_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${MINOR_VERSION}-zstream/${UNAME_M}/")"
128131
BREW_Y1_RELEASE_VERSION="$(get_vrel_from_rpm "${BREW_RPM_SOURCE}/4.${PREVIOUS_MINOR_VERSION}-zstream/${UNAME_M}/")"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM localhost/rhel96-bootc-source:latest
2+
3+
# Copy repository configuration
4+
COPY ./bootc-images/microshift-gitops.repo \
5+
/etc/yum.repos.d/
6+
7+
# Print repository configuration contents.
8+
# Install MicroShift and cleanup.
9+
RUN dnf install -y microshift-gitops && \
10+
rm -vf /etc/yum.repos.d/microshift-*.repo && \
11+
dnf clean all
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[microshift-gitops]
2+
name = Red Hat OpenShift GitOps {{ .Env.GITOPS_VERSION }} for RHEL 9 {{ .Env.UNAME_M }} (RPMs)
3+
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/{{ .Env.UNAME_M }}/gitops/{{ .Env.GITOPS_VERSION }}/os
4+
enabled = 1
5+
gpgcheck = 1
6+
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
7+
sslverify = 1
8+
sslcacert = /etc/rhsm/ca/redhat-uep.pem
9+
sslclientkey = {{ .Env.SSL_CLIENT_KEY_FILE }}
10+
sslclientcert = {{ .Env.SSL_CLIENT_CERT_FILE }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 rhel96-bootc-source-gitops
7+
launch_vm --boot_blueprint rhel96-bootc
8+
}
9+
10+
scenario_remove_vms() {
11+
remove_vm host1
12+
}
13+
14+
scenario_run_tests() {
15+
run_tests host1 \
16+
suites/gitops/
17+
}

test/suites/gitops/gitops.robot

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
*** Settings ***
2+
Documentation MicroShift GitOps tests
3+
4+
Resource ../../resources/microshift-process.resource
5+
6+
Suite Setup Setup Suite With Namespace
7+
Suite Teardown Teardown Suite With Namespace
8+
9+
10+
*** Test Cases ***
11+
Verify GitOps Pods Start Correctly
12+
[Documentation] Waits for pods to enter a running state
13+
14+
Wait Until Keyword Succeeds 2min 10s
15+
... All Pods Should Be Running openshift-gitops
16+
17+
Verify Workload Deployed Correctly
18+
[Documentation] Deploys workload and waits for ready status
19+
20+
VAR ${manifest_path}= ${CURDIR}/test-deployment.yaml
21+
Oc Apply -f ${manifest_path} -n ${NAMESPACE}
22+
Wait Until Keyword Succeeds 5min 10s
23+
... Named Deployment Should Be Available test-app
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: test-app
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: test-app
10+
template:
11+
metadata:
12+
labels:
13+
app: test-app
14+
spec:
15+
containers:
16+
- name: test-app
17+
image: registry.redhat.io/ubi8/httpd-24:latest
18+
ports:
19+
- containerPort: 8080

0 commit comments

Comments
 (0)