Skip to content

Commit

Permalink
fix command execution in kuttl assert for case 01
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
amoralej authored and openshift-merge-bot[bot] committed Jan 17, 2025
1 parent e323293 commit bdd0e99
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/kuttl/test-suites/default/watcher/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -258,16 +258,9 @@ commands:
set -euxo pipefail
oc exec -n watcher-kuttl-default openstackclient -- openstack service list -f value -c Name -c Type |[ $(grep -c ^watcher) == 1 ]
SERVICEID=$(oc exec -n watcher-kuttl-default openstackclient -- openstack service list -f value -c Name -c Type -c ID | grep watcher| awk '{print $1}')
[ $(oc get -n watcher-kuttl-default keystoneservice watcher -o jsonpath={.status.serviceID}) == $SERVICEID ]
[ $(oc get -n watcher-kuttl-default keystoneservice watcher -o jsonpath={.status.serviceID}) == ${SERVICEID} ]
[ -n "$(oc get -n watcher-kuttl-default watcher watcher-kuttl -o jsonpath={.status.hash.dbsync})" ]
---
# Check for Container Image environment variables
apiVersion: kuttl.dev/v1beta1
kind: TestAssert
commands:
- script: |
set -euxo pipefail
# If we are running the container locally, skip this test
# If we are running the container locally, skip following test
if [ "$(oc get pods -n openstack-operators -o name -l openstack.org/operator-name=watcher)" == "" ]; then
exit 0
fi
Expand Down

0 comments on commit bdd0e99

Please sign in to comment.