Skip to content

Commit 19ff922

Browse files
committed
Update tests after implementation testing
conformance/base/manifests.yaml - fix yaml conformance/tests/backendtlspolicy.yaml - fix yaml conformance/tests/tlsroute-simple-same-namespace.go - rename cert for sharing conformance/utils/suite/conformance.go - fix a bug in cleanup-base-resources flag application conformance/utils/suite/suite.go - rename cert for sharing
1 parent ec1ca0e commit 19ff922

File tree

5 files changed

+29
-7
lines changed

5 files changed

+29
-7
lines changed

conformance/base/manifests.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ spec:
300300
volumes:
301301
- name: secret-volume
302302
secret:
303-
secretName: tls-passthrough-checks-certificate
303+
secretName: tls-checks-certificate
304304
items:
305305
- key: tls.crt
306306
path: crt
@@ -763,7 +763,7 @@ spec:
763763
spec:
764764
containers:
765765
- name: backendtlspolicy-test
766-
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20240412-v1.0.0-394-g40c666fd
766+
image: gcr.io/k8s-staging-gateway-api/echo-basic:v20240827-v1.1.0-121-g650e404a
767767
volumeMounts:
768768
- name: secret-volume
769769
mountPath: /etc/secret-volume

conformance/tests/backendtlspolicy.yaml

+24-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: gateway.networking.k8s.io/v1beta1
1+
apiVersion: gateway.networking.k8s.io/v1
22
kind: Gateway
33
metadata:
44
name: gateway-backendtlspolicy
@@ -9,6 +9,12 @@ spec:
99
- name: https
1010
port: 443
1111
protocol: HTTPS
12+
tls:
13+
mode: Terminate
14+
certificateRefs:
15+
- group: ""
16+
kind: Secret
17+
name: tls-checks-certificate
1218
hostname: "*.example.com"
1319
allowedRoutes:
1420
namespaces:
@@ -28,7 +34,23 @@ spec:
2834
name: "backendtlspolicy-test"
2935
validation:
3036
caCertificateRefs:
31-
group: ""
37+
- group: ""
3238
kind: Secret
3339
name: "backend-tls-checks-certificate"
3440
hostname: "abc.example.com"
41+
---
42+
apiVersion: gateway.networking.k8s.io/v1
43+
kind: HTTPRoute
44+
metadata:
45+
name: gateway-conformance-infra-test
46+
namespace: gateway-conformance-infra
47+
spec:
48+
parentRefs:
49+
- name: gateway-backendtlspolicy
50+
namespace: gateway-conformance-infra
51+
hostnames:
52+
- abc.example.com
53+
rules:
54+
- backendRefs:
55+
- name: tls-backend
56+
port: 443

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ var TLSRouteSimpleSameNamespace = suite.ConformanceTest{
4949
ns := "gateway-conformance-infra"
5050
routeNN := types.NamespacedName{Name: "gateway-conformance-infra-test", Namespace: ns}
5151
gwNN := types.NamespacedName{Name: "gateway-tlsroute", Namespace: ns}
52-
certNN := types.NamespacedName{Name: "tls-passthrough-checks-certificate", Namespace: ns}
52+
certNN := types.NamespacedName{Name: "tls-checks-certificate", Namespace: ns}
5353

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

conformance/utils/suite/conformance.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (test *ConformanceTest) Run(t *testing.T, suite *ConformanceTestSuite) {
7070

7171
for _, manifestLocation := range test.Manifests {
7272
tlog.Logf(t, "Applying %s", manifestLocation)
73-
suite.Applier.MustApplyWithCleanup(t, suite.Client, suite.TimeoutConfig, manifestLocation, true)
73+
suite.Applier.MustApplyWithCleanup(t, suite.Client, suite.TimeoutConfig, manifestLocation, suite.Cleanup)
7474
}
7575

7676
if featuresInfo != "" {

conformance/utils/suite/suite.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ func (suite *ConformanceTestSuite) Setup(t *testing.T, tests []ConformanceTest)
357357
suite.Applier.MustApplyObjectsWithCleanup(t, suite.Client, suite.TimeoutConfig, []client.Object{secret}, suite.Cleanup)
358358
secret = kubernetes.MustCreateSelfSignedCertSecret(t, "gateway-conformance-infra", "tls-validity-checks-certificate", []string{"*", "*.org"})
359359
suite.Applier.MustApplyObjectsWithCleanup(t, suite.Client, suite.TimeoutConfig, []client.Object{secret}, suite.Cleanup)
360-
secret = kubernetes.MustCreateSelfSignedCertSecret(t, "gateway-conformance-infra", "tls-passthrough-checks-certificate", []string{"abc.example.com"})
360+
secret = kubernetes.MustCreateSelfSignedCertSecret(t, "gateway-conformance-infra", "tls-checks-certificate", []string{"abc.example.com"})
361361
suite.Applier.MustApplyObjectsWithCleanup(t, suite.Client, suite.TimeoutConfig, []client.Object{secret}, suite.Cleanup)
362362
secret = kubernetes.MustCreateSelfSignedCertSecret(t, "gateway-conformance-app-backend", "tls-passthrough-checks-certificate", []string{"abc.example.com"})
363363
suite.Applier.MustApplyObjectsWithCleanup(t, suite.Client, suite.TimeoutConfig, []client.Object{secret}, suite.Cleanup)

0 commit comments

Comments
 (0)