Skip to content

Commit 365ebe2

Browse files
committed
Add tests to kuttl scenarios to test TLS backends config
This patch checks proper values of config files for TLS enablement.
1 parent 9fef48d commit 365ebe2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ commands:
312312
SERVICEID=$(oc exec -n watcher-kuttl-default openstackclient -- openstack service list -f value -c Name -c Type -c ID | grep watcher| awk '{print $1}')
313313
[ $(oc get -n watcher-kuttl-default keystoneservice watcher -o jsonpath={.status.serviceID}) == ${SERVICEID} ]
314314
[ -n "$(oc get -n watcher-kuttl-default watcher watcher-kuttl -o jsonpath={.status.hash.dbsync})" ]
315+
[ "$(oc get -n watcher-kuttl-default secret watcher-kuttl-api-config-data -o jsonpath='{.data.my\.cnf}'|base64 -d|grep -c 'ssl=1')" == 1 ]
316+
[ "$(oc get -n watcher-kuttl-default secret watcher-kuttl-api-config-data -o jsonpath='{.data.00-default\.conf}'|base64 -d|grep -c 'cafile = /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem')" == 3 ]
315317
# If we are running the container locally, skip following test
316318
if [ "$(oc get pods -n openstack-operators -o name -l openstack.org/operator-name=watcher)" == "" ]; then
317319
exit 0

0 commit comments

Comments
 (0)