diff --git a/hack/e2e-suite/basic.sh b/hack/e2e-suite/basic.sh index 6e194c55ac0..1f38ceb4b7b 100755 --- a/hack/e2e-suite/basic.sh +++ b/hack/e2e-suite/basic.sh @@ -18,7 +18,7 @@ # we're being called by hack/e2e-test.sh (we use some env vars it sets up). # Exit on error -set -x +set -e source "${KUBE_REPO_ROOT}/cluster/kube-env.sh" source "${KUBE_REPO_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh" @@ -49,10 +49,8 @@ while [ $ALL_RUNNING -ne 1 ]; do sleep 5 ALL_RUNNING=1 for id in $POD_ID_LIST; do -echo "==========================================" -echo $KUBECFG CURRENT_STATUS=$($KUBECFG -template '{{and .CurrentState.Info.mynginx.State.Running .CurrentState.Info.net.State.Running}}' get pods/$id) - if [ "$CURRENT_STATUS" != "true" ]; then + if [ "$CURRENT_STATUS" != "{}" ]; then ALL_RUNNING=0 fi done diff --git a/hack/e2e-suite/update.sh b/hack/e2e-suite/update.sh index 8fa0cf1255e..f6d02db48b3 100755 --- a/hack/e2e-suite/update.sh +++ b/hack/e2e-suite/update.sh @@ -40,10 +40,10 @@ function validate() { for id in $POD_ID_LIST; do TEMPLATE_STRING="{{and ((index .CurrentState.Info \"${CONTROLLER_NAME}\").State.Running) .CurrentState.Info.net.State.Running}}" CURRENT_STATUS=$($KUBECFG -template "${TEMPLATE_STRING}" get pods/$id) - if [ "$CURRENT_STATUS" != "true" ]; then + if [ "$CURRENT_STATUS" != "{}" ]; then ALL_RUNNING=0 else - CURRENT_IMAGE=$($KUBECFG -template "{{(index .CurrentState.Info \"${CONTROLLER_NAME}\").Config.Image}}" get pods/$id) + CURRENT_IMAGE=$($KUBECFG -template "{{(index .CurrentState.Info \"${CONTROLLER_NAME}\").DetailInfo.Config.Image}}" get pods/$id) if [ "$CURRENT_IMAGE" != "${DOCKER_HUB_USER}/update-demo:${CONTAINER_IMAGE_VERSION}" ]; then ALL_RUNNING=0 fi