From 04a907639c37e55046387afa3568a668314546b3 Mon Sep 17 00:00:00 2001 From: Jay Deokar Date: Thu, 30 May 2024 08:58:11 -0700 Subject: [PATCH] Keep min instance to be greater than 0 for integration test --- test/integration/cninode/cninode_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/integration/cninode/cninode_test.go b/test/integration/cninode/cninode_test.go index 3bb81bc7..682dc443 100644 --- a/test/integration/cninode/cninode_test.go +++ b/test/integration/cninode/cninode_test.go @@ -44,6 +44,11 @@ var _ = Describe("[CANARY]CNINode test", func() { Expect(err).ToNot(HaveOccurred()) oldMinSize = *asg[0].MinSize oldMaxSize = *asg[0].MaxSize + + // Keep atleast one instance running in the cluster when restoring the values in AfterEach + if oldMinSize == 0 { + oldMinSize = 1 + } }) AfterEach(func() { By("restoring ASG minSize & maxSize after test")