Skip to content

Commit bdd0e99

Browse files
amoralejopenshift-merge-bot[bot]
authored andcommitted
fix command execution in kuttl assert for case 01
We are defining the command in the TestAssert twice and the second one is just overriding the first one which is never executed. This patch is merging both in just one assignment which is what kuttl tests definition seems to expect.
1 parent e323293 commit bdd0e99

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

tests/kuttl/test-suites/default/watcher/01-assert.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,9 @@ commands:
258258
set -euxo pipefail
259259
oc exec -n watcher-kuttl-default openstackclient -- openstack service list -f value -c Name -c Type |[ $(grep -c ^watcher) == 1 ]
260260
SERVICEID=$(oc exec -n watcher-kuttl-default openstackclient -- openstack service list -f value -c Name -c Type -c ID | grep watcher| awk '{print $1}')
261-
[ $(oc get -n watcher-kuttl-default keystoneservice watcher -o jsonpath={.status.serviceID}) == $SERVICEID ]
261+
[ $(oc get -n watcher-kuttl-default keystoneservice watcher -o jsonpath={.status.serviceID}) == ${SERVICEID} ]
262262
[ -n "$(oc get -n watcher-kuttl-default watcher watcher-kuttl -o jsonpath={.status.hash.dbsync})" ]
263-
---
264-
# Check for Container Image environment variables
265-
apiVersion: kuttl.dev/v1beta1
266-
kind: TestAssert
267-
commands:
268-
- script: |
269-
set -euxo pipefail
270-
# If we are running the container locally, skip this test
263+
# If we are running the container locally, skip following test
271264
if [ "$(oc get pods -n openstack-operators -o name -l openstack.org/operator-name=watcher)" == "" ]; then
272265
exit 0
273266
fi

0 commit comments

Comments
 (0)