From c402580b4bce6a1a9a5d3fca2c1e7d77873fd615 Mon Sep 17 00:00:00 2001 From: Tibi <110664232+TiberiuGC@users.noreply.github.com> Date: Fri, 3 Nov 2023 15:15:45 +0200 Subject: [PATCH] [CRUD Suite] Delete extra subnet before deleting cluster (#7248) * Improve CRUD suite runtime~ * refactor to use ginkgo decorators * fix IAM service account * change cluster name * remove duplicate cluster workloads test * refactor describe stacks test * [CRUD integration] Add wait flag to delete cluster command * delete additional subnet * fix typo Co-authored-by: Chetan Patwal * small refactor to trigger workflows --------- Co-authored-by: Chetan Patwal --- integration/tests/crud/creategetdelete_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/integration/tests/crud/creategetdelete_test.go b/integration/tests/crud/creategetdelete_test.go index aa1da20479..d3d4706dde 100644 --- a/integration/tests/crud/creategetdelete_test.go +++ b/integration/tests/crud/creategetdelete_test.go @@ -1083,6 +1083,11 @@ var _ = Describe("(Integration) Create, Get, Scale & Delete", func() { }) var _ = SynchronizedAfterSuite(func() {}, func() { + // before deleting the cluster, first delete the additional subnet + ec2 := awsec2.NewFromConfig(NewConfig(params.Region)) + _, err := ec2.DeleteSubnet(context.Background(), &awsec2.DeleteSubnetInput{SubnetId: &extraSubnetID}) + Expect(err).NotTo(HaveOccurred()) + Expect(params.EksctlDeleteCmd.WithArgs( "cluster", params.ClusterName, "--wait",