Skip to content

Commit 54bd466

Browse files
authored
Merge pull request #2068 from k8s-infra-cherrypick-robot/cherry-pick-2067-to-release-0.7
[release-0.7] conformance: wait for namespace to be ready in TLSRoute test
2 parents e60faa0 + cd370d5 commit 54bd466

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

conformance/tests/tlsroute-simple-same-namespace.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727

2828
"sigs.k8s.io/controller-runtime/pkg/client"
2929

30-
"sigs.k8s.io/gateway-api/apis/v1beta1"
3130
"sigs.k8s.io/gateway-api/conformance/utils/http"
3231
"sigs.k8s.io/gateway-api/conformance/utils/kubernetes"
3332
"sigs.k8s.io/gateway-api/conformance/utils/suite"
@@ -47,10 +46,12 @@ var TLSRouteSimpleSameNamespace = suite.ConformanceTest{
4746
},
4847
Manifests: []string{"tests/tlsroute-simple-same-namespace.yaml"},
4948
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
50-
ns := v1beta1.Namespace("gateway-conformance-infra")
51-
routeNN := types.NamespacedName{Name: "gateway-conformance-infra-test", Namespace: string(ns)}
52-
gwNN := types.NamespacedName{Name: "gateway-tlsroute", Namespace: string(ns)}
53-
certNN := types.NamespacedName{Name: "tls-passthrough-checks-certificate", Namespace: string(ns)}
49+
ns := "gateway-conformance-infra"
50+
routeNN := types.NamespacedName{Name: "gateway-conformance-infra-test", Namespace: ns}
51+
gwNN := types.NamespacedName{Name: "gateway-tlsroute", Namespace: ns}
52+
certNN := types.NamespacedName{Name: "tls-passthrough-checks-certificate", Namespace: ns}
53+
54+
kubernetes.NamespacesMustBeReady(t, suite.Client, suite.TimeoutConfig, []string{ns})
5455

5556
gwAddr, hostnames := kubernetes.GatewayAndTLSRoutesMustBeAccepted(t, suite.Client, suite.TimeoutConfig, suite.ControllerName, kubernetes.NewGatewayRef(gwNN), routeNN)
5657
if len(hostnames) != 1 {

0 commit comments

Comments
 (0)