Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eguzki committed Nov 20, 2023
1 parent ffbd519 commit 0c9289d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions controllers/authpolicy_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ var _ = Describe("AuthPolicy controller", func() {

Eventually(testGatewayIsReady(gateway), 15*time.Second, 5*time.Second).Should(BeTrue())

routeName := fmt.Sprintf("%s-with-hostnames", testHTTPRouteName)
route := testBuildBasicHttpRoute(routeName, gatewayName, testNamespace, []string{"*.api.example.com"})
err = k8sClient.Create(context.Background(), route)
Expect(err).ToNot(HaveOccurred())
Eventually(func() bool {
existingRoute := &gatewayapiv1.HTTPRoute{}
err := k8sClient.Get(context.Background(), client.ObjectKeyFromObject(route), existingRoute)
return err == nil && common.IsHTTPRouteAccepted(existingRoute)
}, 15*time.Second, 5*time.Second).Should(BeTrue())

policy := &api.AuthPolicy{
ObjectMeta: metav1.ObjectMeta{
Name: "gw-auth",
Expand Down

0 comments on commit 0c9289d

Please sign in to comment.