From 43ee0088d4c74c106de9d17bbc070ba0ba294a34 Mon Sep 17 00:00:00 2001 From: Marcin Kaciuba Date: Tue, 14 Nov 2023 13:59:08 +0100 Subject: [PATCH] fix: diconnect before delete --- Makefile | 2 +- castai/cluster.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ec3c3926..fb3c1833 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ test: testacc: @echo "==> Running acceptance tests" - TF_ACC=1 go test ./castai/... '-run=^TestAcc' -v -timeout 10m + TF_ACC=1 go test ./castai/... '-run=^TestAcc' -v -timeout 16m validate-terraform-examples: for examples in examples/eks examples/gke examples/aks ; do \ diff --git a/castai/cluster.go b/castai/cluster.go index 0d348352..3ee1eaba 100644 --- a/castai/cluster.go +++ b/castai/cluster.go @@ -62,7 +62,7 @@ func resourceCastaiClusterDelete(ctx context.Context, data *schema.ResourceData, return triggerDisconnect() } - if chekErr := sdk.CheckResponseNoContent(res, err); chekErr != nil { + if checkErr := sdk.CheckResponseNoContent(res, err); checkErr != nil { return retry.NonRetryableError(fmt.Errorf("error when deleting cluster status %s agent status %s error: %w", clusterStatus, agentStatus, err)) } return retry.RetryableError(fmt.Errorf("triggered cluster deletion"))