From 57c29be3cc62470102e3c4926dee044363891836 Mon Sep 17 00:00:00 2001 From: Domenico Francesco Bruscino Date: Tue, 24 Sep 2024 16:24:32 +0200 Subject: [PATCH] [#1018] Fix address conversion test Clean up after converting empty address CR --- controllers/activemqartemisaddress_controller_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/controllers/activemqartemisaddress_controller_test.go b/controllers/activemqartemisaddress_controller_test.go index 0f80cbd23..fb52eaddf 100644 --- a/controllers/activemqartemisaddress_controller_test.go +++ b/controllers/activemqartemisaddress_controller_test.go @@ -997,6 +997,12 @@ var _ = Describe("Address controller tests", func() { g.Expect(k8sClient.Get(ctx, addressCRKey, v2alpha1AddressCR)).Should(Succeed()) g.Expect(k8sClient.Update(ctx, v2alpha1AddressCR)).Should(Succeed()) }, timeout, interval).Should(Succeed()) + + Eventually(func(g Gomega) { + v1beta1CreatedAddressCR := &brokerv1beta1.ActiveMQArtemisAddress{} + g.Expect(k8sClient.Get(ctx, addressCRKey, v1beta1CreatedAddressCR)).Should(Succeed()) + g.Expect(k8sClient.Delete(ctx, v1beta1CreatedAddressCR)).Should(Succeed()) + }, timeout, interval).Should(Succeed()) }) }) })