From 91a0b3b4067d36c1b50122b61228860c988f2802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bombo?= Date: Tue, 25 Jul 2023 11:21:30 -0700 Subject: [PATCH] tests: aks: Simply delete cluster when cleaning up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we're going to delete the cluster anyway, no need to call kata-cleanup. Fixes: #7454 Signed-off-by: Aurélien Bombo --- tests/integration/kubernetes/gha-run.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/integration/kubernetes/gha-run.sh b/tests/integration/kubernetes/gha-run.sh index c873a0d79..adcbccfae 100755 --- a/tests/integration/kubernetes/gha-run.sh +++ b/tests/integration/kubernetes/gha-run.sh @@ -121,6 +121,11 @@ function cleanup() { echo "Gather information about the nodes and pods before cleaning up the node" get_nodes_and_pods_info "yes" + if [ "${platform}" = "aks" ]; then + delete_cluster + return + fi + # Switch back to the default namespace and delete the tests one kubectl config set-context --current --namespace=default kubectl delete namespace kata-containers-k8s-tests @@ -145,10 +150,6 @@ function cleanup() { kubectl delete ${cleanup_spec} kubectl delete -f "${tools_dir}/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml" kubectl delete -f "${tools_dir}/packaging/kata-deploy/runtimeclasses/kata-runtimeClasses.yaml" - - if [ "${platform}" = "aks" ]; then - delete_cluster - fi } function delete_cluster() {