From 14c1f1ac6db66579ad27d0fe6fbf718af21a8321 Mon Sep 17 00:00:00 2001 From: Maskym Vavilov Date: Thu, 4 Jan 2024 11:19:44 +0000 Subject: [PATCH] test --- test/e2e/gateway_single_spoke_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/gateway_single_spoke_test.go b/test/e2e/gateway_single_spoke_test.go index 184b1f2c..ed323696 100644 --- a/test/e2e/gateway_single_spoke_test.go +++ b/test/e2e/gateway_single_spoke_test.go @@ -368,8 +368,8 @@ var _ = Describe("Gateway single target cluster", func() { if gw.Spec.Listeners == nil { gw.Spec.Listeners = []gatewayapiv1.Listener{} } - AddListener("wildcard", testHostnameWildcard, gatewayapiv1.ObjectName(testHostname), gw) patch := client.MergeFrom(gw.DeepCopy()) + AddListener("wildcard", testHostnameWildcard, gatewayapiv1.ObjectName(testHostname), gw) err = tconfig.HubClient().Patch(ctx, gw, patch) Expect(err).ToNot(HaveOccurred()) Eventually(func(g Gomega, ctx SpecContext) { @@ -427,9 +427,9 @@ var _ = Describe("Gateway single target cluster", func() { if gw.Spec.Listeners == nil { gw.Spec.Listeners = []gatewayapiv1.Listener{} } + patch := client.MergeFrom(gw.DeepCopy()) AddListener("other", testHostnameOther, gatewayapiv1.ObjectName(testHostnameOther), gw) Eventually(func(g Gomega, ctx SpecContext) { - patch := client.MergeFrom(gw.DeepCopy()) err = tconfig.HubClient().Patch(ctx, gw, patch) Expect(err).ToNot(HaveOccurred()) checkGateway := &gatewayapiv1.Gateway{} @@ -447,6 +447,7 @@ var _ = Describe("Gateway single target cluster", func() { // remove the listener err = tconfig.HubClient().Get(ctx, client.ObjectKey{Name: testID, Namespace: tconfig.HubNamespace()}, gw) Expect(err).ToNot(HaveOccurred()) + patch = client.MergeFrom(gw.DeepCopy()) if gw.Spec.Listeners == nil { gw.Spec.Listeners = []gatewayapiv1.Listener{} @@ -457,7 +458,6 @@ var _ = Describe("Gateway single target cluster", func() { gw.Spec.Listeners = append(gw.Spec.Listeners[:i], gw.Spec.Listeners[i+1:]...) } } - patch := client.MergeFrom(gw.DeepCopy()) err = tconfig.HubClient().Patch(ctx, gw, patch) Expect(err).ToNot(HaveOccurred()) Eventually(func(g Gomega, ctx SpecContext) {