Fix upgrade test
* Fix upgrade test
Fix the new image check in the deployment, by only searching for part of the image name, the part that must be there.
* fix code review comment
* fix oc get command
@@ -226,7 +226,8 @@ ${CMD} wait deployment ${HCO_DEPLOYMENT_NAME} --for condition=Available -n ${HCO
Msg "verify the hyperconverged-cluster deployment is using the new image"
-./hack/retry.sh 6 30 "${CMD} get deployments -n ${HCO_NAMESPACE} -o yaml | grep image | grep hyperconverged-cluster | grep ${REGISTRY_IMAGE_URL_PREFIX}"
+SEARCH_PHRASE="${OPENSHIFT_BUILD_NAMESPACE}/stable"
+./hack/retry.sh 6 30 "${CMD} get -n ${HCO_NAMESPACE} deployment ${HCO_DEPLOYMENT_NAME} -o jsonpath=\"{ .spec.template.spec.containers[0].image }\" | grep ${SEARCH_PHRASE}"
Msg "wait that cluster is operational after upgrade"
timeout 20m bash -c 'export CMD="${CMD}";exec ./hack/check-state.sh'
