From 83a30c8c12baa067b6b25e9996dab2da565de9a7 Mon Sep 17 00:00:00 2001 From: Reed Schalo Date: Thu, 26 Sep 2024 16:21:17 -0700 Subject: [PATCH] fix additional termination states in test --- test/suites/integration/termination_test.go | 2 +- test/suites/nodeclaim/garbage_collection_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/suites/integration/termination_test.go b/test/suites/integration/termination_test.go index cbd32fb51a27..a42de19966aa 100644 --- a/test/suites/integration/termination_test.go +++ b/test/suites/integration/termination_test.go @@ -44,7 +44,7 @@ var _ = Describe("Termination", func() { env.ExpectDeleted(nodes[0]) env.EventuallyExpectNotFound(nodes[0]) Eventually(func(g Gomega) { - g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(Equal("shutting-down")) + g.Expect(lo.FromPtr(env.GetInstanceByID(instanceID).State.Name)).To(BeElementOf("shutting-down", "terminated")) }, time.Second*10).Should(Succeed()) }) }) diff --git a/test/suites/nodeclaim/garbage_collection_test.go b/test/suites/nodeclaim/garbage_collection_test.go index 35d5dd4700bc..186fe8cfd90d 100644 --- a/test/suites/nodeclaim/garbage_collection_test.go +++ b/test/suites/nodeclaim/garbage_collection_test.go @@ -140,7 +140,7 @@ var _ = Describe("GarbageCollection", func() { // Eventually expect the node and the instance to be removed (shutting-down) env.EventuallyExpectNotFound(node) Eventually(func(g Gomega) { - g.Expect(lo.FromPtr(env.GetInstanceByID(aws.StringValue(out.Instances[0].InstanceId)).State.Name)).To(Equal("shutting-down")) + g.Expect(lo.FromPtr(env.GetInstanceByID(aws.StringValue(out.Instances[0].InstanceId)).State.Name)).To(BeElementOf("shutting-down", "terminated")) }, time.Second*10).Should(Succeed()) }) It("should succeed to garbage collect an Instance that was deleted without the cluster's knowledge", func() {