Skip to content

Commit

Permalink
Merge pull request #2068 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2067-to-release-0.7

[release-0.7] conformance: wait for namespace to be ready in TLSRoute test
  • Loading branch information
k8s-ci-robot authored May 26, 2023
2 parents e60faa0 + cd370d5 commit 54bd466
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions conformance/tests/tlsroute-simple-same-namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import (

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

"sigs.k8s.io/gateway-api/apis/v1beta1"
"sigs.k8s.io/gateway-api/conformance/utils/http"
"sigs.k8s.io/gateway-api/conformance/utils/kubernetes"
"sigs.k8s.io/gateway-api/conformance/utils/suite"
Expand All @@ -47,10 +46,12 @@ var TLSRouteSimpleSameNamespace = suite.ConformanceTest{
},
Manifests: []string{"tests/tlsroute-simple-same-namespace.yaml"},
Test: func(t *testing.T, suite *suite.ConformanceTestSuite) {
ns := v1beta1.Namespace("gateway-conformance-infra")
routeNN := types.NamespacedName{Name: "gateway-conformance-infra-test", Namespace: string(ns)}
gwNN := types.NamespacedName{Name: "gateway-tlsroute", Namespace: string(ns)}
certNN := types.NamespacedName{Name: "tls-passthrough-checks-certificate", Namespace: string(ns)}
ns := "gateway-conformance-infra"
routeNN := types.NamespacedName{Name: "gateway-conformance-infra-test", Namespace: ns}
gwNN := types.NamespacedName{Name: "gateway-tlsroute", Namespace: ns}
certNN := types.NamespacedName{Name: "tls-passthrough-checks-certificate", Namespace: ns}

kubernetes.NamespacesMustBeReady(t, suite.Client, suite.TimeoutConfig, []string{ns})

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

0 comments on commit 54bd466

Please sign in to comment.