Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
fix(e2e): Correctly wait until stack deletion completes
Browse files Browse the repository at this point in the history
This has been broken since db304dd
  • Loading branch information
mumoshu committed Jan 11, 2017
1 parent 18c5c03 commit c979c9a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions e2e/run
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ WORK_DIR=${E2E_DIR}/assets/${KUBE_AWS_CLUSTER_NAME}
TESTINFRA_DIR=${E2E_DIR}/testinfra
KUBE_AWS_NODE_POOL_INDEX=${KUBE_AWS_NODE_POOL_INDEX:-1}
KUBE_AWS_NODE_POOL_NAME=${KUBE_AWS_CLUSTER_NAME}-nodepool${KUBE_AWS_NODE_POOL_INDEX}
KUBE_AWS_NODE_POOL_STACK_NAME=${KUBE_AWS_CLUSTER_NAME}-${KUBE_AWS_NODE_POOL_NAME}
NODE_POOL_ASSETS_DIR=${E2E_DIR}/assets/${KUBE_AWS_CLUSTER_NAME}/node-pools/${KUBE_AWS_NODE_POOL_NAME}
KUBE_AWS_TEST_INFRA_STACK_NAME=${KUBE_AWS_TEST_INFRA_STACK_NAME:-${KUBE_AWS_CLUSTER_NAME}-testinfra}
SRC_DIR=$(cd $(dirname $0); cd ..; pwd)
Expand Down Expand Up @@ -330,13 +331,13 @@ nodepool_update() {
nodepool_destroy() {
cd ${WORK_DIR}

status=$(aws cloudformation describe-stacks --stack-name ${KUBE_AWS_NODE_POOL_NAME} --output json | jq -rc '.Stacks[0].StackStatus')
status=$(aws cloudformation describe-stacks --stack-name ${KUBE_AWS_NODE_POOL_STACK_NAME} --output json | jq -rc '.Stacks[0].StackStatus')

if [ "$status" != "DELETE_IN_PROGRESS" ]; then
${KUBE_AWS_CMD} node-pools destroy --node-pool-name ${KUBE_AWS_NODE_POOL_NAME}
else
aws cloudformation wait stack-delete-complete \
--stack-name ${KUBE_AWS_NODE_POOL_NAME}
--stack-name ${KUBE_AWS_NODE_POOL_STACK_NAME}
fi
}

Expand Down

0 comments on commit c979c9a

Please sign in to comment.