mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
Update e2e test to reflect the change.
This commit is contained in:
parent
66eadb514a
commit
96686b3692
@ -18,7 +18,7 @@
|
|||||||
# we're being called by hack/e2e-test.sh (we use some env vars it sets up).
|
# we're being called by hack/e2e-test.sh (we use some env vars it sets up).
|
||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -x
|
set -e
|
||||||
|
|
||||||
source "${KUBE_REPO_ROOT}/cluster/kube-env.sh"
|
source "${KUBE_REPO_ROOT}/cluster/kube-env.sh"
|
||||||
source "${KUBE_REPO_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh"
|
source "${KUBE_REPO_ROOT}/cluster/$KUBERNETES_PROVIDER/util.sh"
|
||||||
@ -49,10 +49,8 @@ while [ $ALL_RUNNING -ne 1 ]; do
|
|||||||
sleep 5
|
sleep 5
|
||||||
ALL_RUNNING=1
|
ALL_RUNNING=1
|
||||||
for id in $POD_ID_LIST; do
|
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)
|
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
|
ALL_RUNNING=0
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -40,10 +40,10 @@ function validate() {
|
|||||||
for id in $POD_ID_LIST; do
|
for id in $POD_ID_LIST; do
|
||||||
TEMPLATE_STRING="{{and ((index .CurrentState.Info \"${CONTROLLER_NAME}\").State.Running) .CurrentState.Info.net.State.Running}}"
|
TEMPLATE_STRING="{{and ((index .CurrentState.Info \"${CONTROLLER_NAME}\").State.Running) .CurrentState.Info.net.State.Running}}"
|
||||||
CURRENT_STATUS=$($KUBECFG -template "${TEMPLATE_STRING}" get pods/$id)
|
CURRENT_STATUS=$($KUBECFG -template "${TEMPLATE_STRING}" get pods/$id)
|
||||||
if [ "$CURRENT_STATUS" != "true" ]; then
|
if [ "$CURRENT_STATUS" != "{}" ]; then
|
||||||
ALL_RUNNING=0
|
ALL_RUNNING=0
|
||||||
else
|
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
|
if [ "$CURRENT_IMAGE" != "${DOCKER_HUB_USER}/update-demo:${CONTAINER_IMAGE_VERSION}" ]; then
|
||||||
ALL_RUNNING=0
|
ALL_RUNNING=0
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user