Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
maksymvavilov committed Jan 4, 2024
1 parent 6ec1452 commit 14c1f1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/e2e/gateway_single_spoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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{}
Expand All @@ -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{}
Expand All @@ -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) {
Expand Down

0 comments on commit 14c1f1a

Please sign in to comment.