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

Commit c979c9a

Browse files
committed
fix(e2e): Correctly wait until stack deletion completes
This has been broken since db304dd
1 parent 18c5c03 commit c979c9a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

e2e/run

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ WORK_DIR=${E2E_DIR}/assets/${KUBE_AWS_CLUSTER_NAME}
66
TESTINFRA_DIR=${E2E_DIR}/testinfra
77
KUBE_AWS_NODE_POOL_INDEX=${KUBE_AWS_NODE_POOL_INDEX:-1}
88
KUBE_AWS_NODE_POOL_NAME=${KUBE_AWS_CLUSTER_NAME}-nodepool${KUBE_AWS_NODE_POOL_INDEX}
9+
KUBE_AWS_NODE_POOL_STACK_NAME=${KUBE_AWS_CLUSTER_NAME}-${KUBE_AWS_NODE_POOL_NAME}
910
NODE_POOL_ASSETS_DIR=${E2E_DIR}/assets/${KUBE_AWS_CLUSTER_NAME}/node-pools/${KUBE_AWS_NODE_POOL_NAME}
1011
KUBE_AWS_TEST_INFRA_STACK_NAME=${KUBE_AWS_TEST_INFRA_STACK_NAME:-${KUBE_AWS_CLUSTER_NAME}-testinfra}
1112
SRC_DIR=$(cd $(dirname $0); cd ..; pwd)
@@ -330,13 +331,13 @@ nodepool_update() {
330331
nodepool_destroy() {
331332
cd ${WORK_DIR}
332333

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

335336
if [ "$status" != "DELETE_IN_PROGRESS" ]; then
336337
${KUBE_AWS_CMD} node-pools destroy --node-pool-name ${KUBE_AWS_NODE_POOL_NAME}
337338
else
338339
aws cloudformation wait stack-delete-complete \
339-
--stack-name ${KUBE_AWS_NODE_POOL_NAME}
340+
--stack-name ${KUBE_AWS_NODE_POOL_STACK_NAME}
340341
fi
341342
}
342343

0 commit comments

Comments
 (0)