Skip to content

Commit

Permalink
Add kuttl tests for WatcherAPI
Browse files Browse the repository at this point in the history
  • Loading branch information
cescgina authored and openshift-merge-bot[bot] committed Dec 11, 2024
1 parent 573ece5 commit ae12ade
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ delete:
- apiVersion: watcher.openstack.org/v1beta1
kind: Watcher
name: watcher-kuttl
namespace: watcher-kuttl-default
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: watcher.openstack.org/v1beta1
kind: Watcher
metadata:
name: watcher-kuttl
namespace: watcher-kuttl-default
spec:
databaseInstance: "openstack"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: kuttl.dev/v1beta1
kind: TestStep
delete:
- apiVersion: watcher.openstack.org/v1beta1
kind: WatcherAPI
name: watcherapi-kuttl
26 changes: 26 additions & 0 deletions tests/kuttl/test-suites/default/watcher-api/03-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: watcher.openstack.org/v1beta1
kind: WatcherAPI
metadata:
finalizers:
- openstack.org/watcherapi
name: watcherapi-kuttl
spec:
databaseAccount: watcher
databaseInstance: openstack
passwordSelectors:
service: WatcherPassword
secret: osp-secret
status:
conditions:
- message: Setup complete
reason: Ready
status: "True"
type: Ready
- message: Input data complete
reason: Ready
status: "True"
type: InputReady
- message: Service config create completed
reason: Ready
status: "True"
type: ServiceConfigReady
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: watcher.openstack.org/v1beta1
kind: WatcherAPI
metadata:
name: watcherapi-kuttl
spec:
databaseInstance: "openstack"
9 changes: 9 additions & 0 deletions tests/kuttl/test-suites/default/watcher-api/05-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
namespaced: true
commands:
- script: |
set -ex
oc get mariadbaccount -n ${NAMESPACE} --no-headers=true | [ $(grep -c ^watcher) == 0 ]
oc get mariadbdatabase -n ${NAMESPACE} --no-headers=true | [ $(grep -c ^watcher) == 0 ]
oc get secret -n ${NAMESPACE} --no-headers=true | [ $(grep -c ^watcher) == 0 ]

0 comments on commit ae12ade

Please sign in to comment.