Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #286 from cescgina/fix_deployment_name
Browse files Browse the repository at this point in the history
Use correct deployment name in kuttl tests
  • Loading branch information
openshift-merge-bot[bot] authored Jan 9, 2024
2 parents 60afd97 + 1a015d7 commit 4592cd4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions tests/kuttl/tests/run_simple_playbook/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ kind: TestAssert
commands:
- script: |
tupleTemplate='{{ range (index .spec.template.spec.containers 1).env }}{{ .name }}{{ "#" }}{{ .value}}{{"\n"}}{{ end }}'
imageTuples=$(oc get -n openstack-operators deployment openstack-ansible-operator-controller-manager -o go-template="$tupleTemplate")
imageTuples=$(oc get -n openstack-operators deployment openstack-ansibleee-operator-controller-manager -o go-template="$tupleTemplate")
# format of imageTuple is: RELATED_IMAGE_ANSIBLEEE_<service>#<image URL with SHA> separated by newlines
for ITEM in $(echo $imageTuples); do
# it is an image
Expand All @@ -72,12 +72,12 @@ commands:
IMG_FROM_ENV=$(echo $ITEM | sed -e 's|^.*#\(.*\)|\1|')
template='{{.spec.image}}'
case $NAME in
API)
IMAGE)
SERVICE_IMAGE=$(oc get -n $NAMESPACE openstackansibleee ansibleee-play -o go-template="$template")
;;
esac
if [ "$SERVICE_IMAGE" != "$IMG_FROM_ENV" ]; then
echo "$NAME image does not equal $VALUE"
echo "$SERVICE_IMAGE image does not equal $IMG_FROM_ENV"
exit 1
fi
fi
Expand Down
6 changes: 3 additions & 3 deletions tests/kuttl/tests/run_simple_playbook_debug/01-assert.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ kind: TestAssert
commands:
- script: |
tupleTemplate='{{ range (index .spec.template.spec.containers 1).env }}{{ .name }}{{ "#" }}{{ .value}}{{"\n"}}{{ end }}'
imageTuples=$(oc get -n openstack-operators deployment openstack-ansible-operator-controller-manager -o go-template="$tupleTemplate")
imageTuples=$(oc get -n openstack-operators deployment openstack-ansibleee-operator-controller-manager -o go-template="$tupleTemplate")
# format of imageTuple is: RELATED_IMAGE_ANSIBLEEE_<service>#<image URL with SHA> separated by newlines
for ITEM in $(echo $imageTuples); do
# it is an image
Expand All @@ -70,12 +70,12 @@ commands:
IMG_FROM_ENV=$(echo $ITEM | sed -e 's|^.*#\(.*\)|\1|')
template='{{.spec.image}}'
case $NAME in
API)
IMAGE)
SERVICE_IMAGE=$(oc get -n $NAMESPACE openstackansibleee ansibleee-play-debug -o go-template="$template")
;;
esac
if [ "$SERVICE_IMAGE" != "$IMG_FROM_ENV" ]; then
echo "$NAME image does not equal $VALUE"
echo "$SERVICE_IMAGE image does not equal $IMG_FROM_ENV"
exit 1
fi
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ kind: TestAssert
commands:
- script: |
tupleTemplate='{{ range (index .spec.template.spec.containers 1).env }}{{ .name }}{{ "#" }}{{ .value}}{{"\n"}}{{ end }}'
imageTuples=$(oc get -n openstack-operators deployment openstack-ansible-operator-controller-manager -o go-template="$tupleTemplate")
imageTuples=$(oc get -n openstack-operators deployment openstack-ansibleee-operator-controller-manager -o go-template="$tupleTemplate")
# format of imageTuple is: RELATED_IMAGE_ANSIBLEEE_<service>#<image URL with SHA> separated by newlines
for ITEM in $(echo $imageTuples); do
# it is an image
Expand All @@ -76,12 +76,12 @@ commands:
IMG_FROM_ENV=$(echo $ITEM | sed -e 's|^.*#\(.*\)|\1|')
template='{{.spec.image}}'
case $NAME in
API)
IMAGE)
SERVICE_IMAGE=$(oc get -n $NAMESPACE openstackansibleee ansibleee-play-debug -o go-template="$template")
;;
esac
if [ "$SERVICE_IMAGE" != "$IMG_FROM_ENV" ]; then
echo "$NAME image does not equal $VALUE"
echo "$SERVICE_IMAGE image does not equal $IMG_FROM_ENV"
exit 1
fi
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ kind: TestAssert
commands:
- script: |
tupleTemplate='{{ range (index .spec.template.spec.containers 1).env }}{{ .name }}{{ "#" }}{{ .value}}{{"\n"}}{{ end }}'
imageTuples=$(oc get -n openstack-operators deployment openstack-ansible-operator-controller-manager -o go-template="$tupleTemplate")
imageTuples=$(oc get -n openstack-operators deployment openstack-ansibleee-operator-controller-manager -o go-template="$tupleTemplate")
# format of imageTuple is: RELATED_IMAGE_ANSIBLEEE_<service>#<image URL with SHA> separated by newlines
for ITEM in $(echo $imageTuples); do
# it is an image
Expand All @@ -78,12 +78,12 @@ commands:
IMG_FROM_ENV=$(echo $ITEM | sed -e 's|^.*#\(.*\)|\1|')
template='{{.spec.image}}'
case $NAME in
API)
IMAGE)
SERVICE_IMAGE=$(oc get -n $NAMESPACE openstackansibleee ansibleee-play-extravars -o go-template="$template")
;;
esac
if [ "$SERVICE_IMAGE" != "$IMG_FROM_ENV" ]; then
echo "$NAME image does not equal $VALUE"
echo "$SERVICE_IMAGE image does not equal $IMG_FROM_ENV"
exit 1
fi
fi
Expand Down

0 comments on commit 4592cd4

Please sign in to comment.