Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions config/samples/layout/bases/tempest/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../test_v1beta1_tempest.yaml
11 changes: 11 additions & 0 deletions config/samples/layout/tempest/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../bases/tempest
patches:
- patch: |-
- op: replace
path: /metadata/namespace
value: test-operator-kuttl-tests
target:
kind: Tempest
23 changes: 23 additions & 0 deletions kuttl-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# EXECUTION (from install_yamls repo root):
#
# make test_operator_kuttl
#
# ASSUMPTIONS:
#
# 1. Latest version of kuttl is installed at /usr/local/bin/kubectl-kuttl
# 2. An OCP 4.10+ CRC cluster with Podified Operators has been deployed
# 3. CLI user has access to $KUBECONFIG
# 4. The environment variable INSTALL_YAMLS is set to the path of the
# install_yamls repo

apiVersion: kuttl.dev/v1beta1
kind: TestSuite
reportFormat: xml
reportName: kuttl-report-test-operator
reportGranularity: test
namespace: test-operator-kuttl-tests
timeout: 180
parallel: 1
suppress:
- events # Remove spammy event logs
21 changes: 21 additions & 0 deletions test/kuttl/common/cleanup-all-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: v1
kind: ConfigMap
name: openstack-config
- apiVersion: v1
kind: Secret
name: openstack-config-secret
- apiVersion: test.openstack.org/v1beta1
kind: Tempest
name: tempest-sample
- apiVersion: test.openstack.org/v1beta1
kind: Tobiko
name: tobiko-sample
- apiVersion: test.openstack.org/v1beta1
kind: AnsibleTest
name: ansibletest-sample
- apiVersion: test.openstack.org/v1beta1
kind: HorizonTest
name: horizontest-sample
61 changes: 61 additions & 0 deletions test/kuttl/common/errors-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#
# Check for:
#
# No CRs
# No Pods
# No ConfigMaps
# No Secrets
#
apiVersion: v1
kind: ConfigMap
metadata:
name: openstack-config
---
apiVersion: v1
kind: Secret
metadata:
name: openstack-config-secret
---
apiVersion: test.openstack.org/v1beta1
kind: Tempest
metadata:
name: tempest-sample
---
apiVersion: test.openstack.org/v1beta1
kind: Tobiko
metadata:
name: tobiko-sample
---
apiVersion: test.openstack.org/v1beta1
kind: AnsibleTest
metadata:
name: ansibletest-sample
---
apiVersion: test.openstack.org/v1beta1
kind: HorizonTest
metadata:
name: horizontest-sample
---
apiVersion: v1
kind: Pod
metadata:
labels:
job-name: tempest-sample
---
apiVersion: v1
kind: Pod
metadata:
labels:
job-name: tobiko-sample
---
apiVersion: v1
kind: Pod
metadata:
labels:
job-name: ansibletest-sample
---
apiVersion: v1
kind: Pod
metadata:
labels:
job-name: horizontest-sample
16 changes: 16 additions & 0 deletions test/kuttl/tests/tempest-basic/01-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: test.openstack.org/v1beta1
kind: Tempest
metadata:
name: tempest-sample
status:
conditions:
- type: Ready
status: "True"
- type: DeploymentReady
status: "True"
- type: InputReady
status: "True"
- type: NetworkAttachmentsReady
status: "True"
- type: ServiceConfigReady
status: "True"
5 changes: 5 additions & 0 deletions test/kuttl/tests/tempest-basic/01-deploy-tempest.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
oc kustomize ../../../../config/samples/layout/tempest | oc apply -f -
1 change: 1 addition & 0 deletions test/kuttl/tests/tempest-basic/99-cleanup.yaml
1 change: 1 addition & 0 deletions test/kuttl/tests/tempest-basic/99-errors.yaml
11 changes: 11 additions & 0 deletions test/kuttl/tests/tempest-basic/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../config/samples/test_v1beta1_tempest.yaml
patches:
- patch: |-
- op: replace
path: /metadata/namespace
value: test-operator-kuttl-tests
target:
kind: Tempest
20 changes: 20 additions & 0 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
---
- job:
name: test-operator-kuttl
parent: cifmw-base-multinode-kuttl
attempts: 1
required-projects:
- github.com/openstack-k8s-operators/test-operator
irrelevant-files: &ir_files
- .*/*.md
- ^\..*$
- ^LICENSE$
- ^OWNERS$
- ^OWNERS_ALIASES$
- ^PROJECT$
- ^README.md$
- tests?\/functional
- ^renovate.json$
vars:
cifmw_kuttl_tests_operator_list:
- test_operator

- job:
name: podified-multinode-edpm-deployment-crc-test-operator
parent: podified-multinode-hci-deployment-crc-1comp-backends
Expand Down
3 changes: 3 additions & 0 deletions zuul.d/projects.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
- openstack-k8s-operators-content-provider:
vars:
cifmw_install_yamls_sdk_version: v1.41.1
- test-operator-kuttl:
dependencies:
- openstack-k8s-operators-content-provider
- podified-multinode-edpm-deployment-crc-test-operator:
dependencies:
- openstack-k8s-operators-content-provider
Loading