Update e2e test to reflect the change.

This commit is contained in:
Dawn Chen 2014-09-24 16:42:10 -07:00
parent 66eadb514a
commit 96686b3692
2 changed files with 4 additions and 6 deletions

View File

@ -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

View File

@ -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