Skip to content

Commit

Permalink
Fix all kuttl asserts
Browse files Browse the repository at this point in the history
These tests were not running, and need fixing either due to changes in
endpoint names, or incorrect regex patterns.
  • Loading branch information
steveb committed May 16, 2024
1 parent 4d8c070 commit 57fdd7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/kuttl/common/assert-endpoints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ commands:
- script: |
set -euxo pipefail
template='{{.status.apiEndpoints.ironic.public}}{{":"}}{{.status.apiEndpoints.ironic.internal}}{{"\n"}}'
regex="http:\/\/ironic-public-$NAMESPACE\.apps.*:http:\/\/ironic-admin-$NAMESPACE\.apps.*:http:\/\/ironic-internal-$NAMESPACE\.apps.*"
regex="http:\/\/ironic-public\.$NAMESPACE\..*:http:\/\/ironic-internal\.$NAMESPACE\..*"
apiEndpoints=$(oc get -n $NAMESPACE ironics.ironic.openstack.org ironic -o go-template="$template")
matches=$(echo "$apiEndpoints" | sed -e "s?$regex??")
if [ -z "$matches" ]; then
Expand All @@ -30,7 +30,7 @@ commands:
- script: |
set -euxo pipefail
template='{{index .status.apiEndpoints "ironic-inspector" "public"}}{{":"}}{{index .status.apiEndpoints "ironic-inspector" "internal"}}{{"\n"}}'
regex="http:\/\/ironic-inspector-public-$NAMESPACE\.apps.*:http:\/\/ironic-inspector-admin-$NAMESPACE\.apps.*:http:\/\/ironic-inspector-internal-$NAMESPACE\.apps.*"
regex="http:\/\/ironic-inspector-public\.$NAMESPACE\..*:http:\/\/ironic-inspector-internal\.$NAMESPACE\..*"
apiEndpoints=$(oc get -n $NAMESPACE ironics.ironic.openstack.org ironic -o go-template="$template")
matches=$(echo "$apiEndpoints" | sed -e "s?$regex??")
if [ -z "$matches" ]; then
Expand Down
4 changes: 2 additions & 2 deletions tests/kuttl/tests/deploy_tls/10-assert-deploy-ironic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ commands:
- script: |
set -euxo pipefail
template='{{.spec.endpoints.internal}}{{":"}}{{.spec.endpoints.public}}{{"\n"}}'
regex="https:\/\/ironic-internal.$NAMESPACE.*:https:\/\/ironic-public.$NAMESPACE.*"
regex="https:\/\/ironic-internal\.$NAMESPACE\..*:https:\/\/ironic-public\.$NAMESPACE\..*"
apiEndpoints=$(oc get -n $NAMESPACE KeystoneEndpoint ironic -o go-template="$template")
matches=$(echo "$apiEndpoints" | sed -e "s?$regex??")
if [[ -n "$matches" ]]; then
Expand All @@ -121,7 +121,7 @@ commands:
- script: |
set -euxo pipefail
template='{{.spec.endpoints.internal}}{{":"}}{{.spec.endpoints.public}}{{"\n"}}'
regex="https:\/\/ironic-inspector-internal.$NAMESPACE.*:https:\/\/ironic-inspector-public.$NAMESPACE.*"
regex="https:\/\/ironic-inspector-internal\.$NAMESPACE\..*:https:\/\/ironic-inspector-public\.$NAMESPACE\..*"
apiEndpoints=$(oc get -n $NAMESPACE KeystoneEndpoint ironic-inspector -o go-template="$template")
matches=$(echo "$apiEndpoints" | sed -e "s?$regex??")
if [[ -n "$matches" ]]; then
Expand Down

0 comments on commit 57fdd7d

Please sign in to comment.