Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

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 1d1a06b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/e2e/gateway_single_spoke_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,14 +368,20 @@ 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)
fmt.Printf("listeners len %d ; ", len(gw.Spec.Listeners))
for _, listener := range gw.Spec.Listeners {
fmt.Printf("in loop listener name: %s ; ", listener.Name)
}
fmt.Println()
Expect(err).ToNot(HaveOccurred())
Eventually(func(g Gomega, ctx SpecContext) {
checkGateway := &gatewayapiv1.Gateway{}
err = tconfig.HubClient().Get(ctx, client.ObjectKey{Name: testID, Namespace: tconfig.HubNamespace()}, checkGateway)
g.Expect(err).ToNot(HaveOccurred())
fmt.Printf("listener1 %s ; ", gw.Spec.Listeners[0].Name)
g.Expect(len(checkGateway.Spec.Listeners)).To(Equal(2))
}).WithContext(ctx).WithTimeout(100 * time.Second).WithPolling(2 * time.Second).Should(Succeed())
}
Expand Down

0 comments on commit 1d1a06b

Please sign in to comment.