@@ -25,6 +25,7 @@ import (
25
25
26
26
. "github.com/onsi/ginkgo/v2"
27
27
. "github.com/onsi/gomega"
28
+ contour_api_v1 "github.com/projectcontour/contour/apis/projectcontour/v1"
28
29
contour_api_v1alpha1 "github.com/projectcontour/contour/apis/projectcontour/v1alpha1"
29
30
"github.com/projectcontour/contour/internal/gatewayapi"
30
31
"github.com/projectcontour/contour/internal/k8s"
@@ -519,7 +520,7 @@ var _ = Describe("Gateway provisioner", func() {
519
520
Spec : contour_api_v1alpha1.ContourDeploymentSpec {
520
521
RuntimeSettings : contourDeploymentRuntimeSettings (),
521
522
Contour : & contour_api_v1alpha1.ContourSettings {
522
- WatchNamespaces : []contour_api_v1alpha1 .Namespace {"testns-1" , "testns-2" },
523
+ WatchNamespaces : []contour_api_v1 .Namespace {"testns-1" , "testns-2" },
523
524
},
524
525
},
525
526
}
@@ -643,17 +644,15 @@ var _ = Describe("Gateway provisioner", func() {
643
644
// Root proxy in non-watched namespace should fail
644
645
By (fmt .Sprintf ("Expect namespace %s not to be watched by contour" , t .namespace ))
645
646
hr , ok := f .CreateHTTPRouteAndWaitFor (route , e2e .HTTPRouteIngnoredByContour )
646
- By (fmt .Sprintf ("Expect httproute under namespace %s is not accepted" , t .namespace ))
647
- require .True (f .T (), ok , fmt .Sprintf ("httproute's is %v" , hr ))
648
647
649
648
By (fmt .Sprintf ("Expect httproute under namespace %s is not accepted for a period of time" , t .namespace ))
650
649
require .Never (f .T (), func () bool {
651
- r : = & gatewayapi_v1beta1.HTTPRoute {}
652
- if err := f .Client .Get (context .Background (), k8s .NamespacedNameOf (hr ), r ); err != nil {
650
+ hr = & gatewayapi_v1beta1.HTTPRoute {}
651
+ if err := f .Client .Get (context .Background (), k8s .NamespacedNameOf (hr ), hr ); err != nil {
653
652
return false
654
653
}
655
- return e2e .HTTPRouteAccepted (r )
656
- }, 10 * time .Second , time .Second )
654
+ return e2e .HTTPRouteAccepted (hr )
655
+ }, 10 * time .Second , time .Second , hr )
657
656
require .True (f .T (), ok , fmt .Sprintf ("httproute's is %v" , hr ))
658
657
}
659
658
}
0 commit comments