Skip to content

Commit dab3cae

Browse files
authored
test(e2e): give each MultipleGC test its own internet Gateway (#9921)
All three Internet suite tests declare internet-gateway, and the conformance suite deletes a test's resources when it finishes, so the Gateway is deleted and recreated back to back between subtests. The recreated object can be left sitting at the CRD's default status (Accepted/Programmed Unknown, with observedGeneration 0), and the test then times out waiting for an address. #8448 gave the private Gateways per-test names for the same reason; do the same for the internet ones. xref #8677 Signed-off-by: Huabing (Robin) Zhao <zhaohuabing@gmail.com> Signed-off-by: Huabing (Robin) Zhao <huabing@tetrate.io>
1 parent 20a3355 commit dab3cae

3 files changed

Lines changed: 14 additions & 6 deletions

File tree

test/e2e/testdata/httproute-status-multiple-gc.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
# The Gateways below are named for this test alone. The suite deletes a test's
2+
# resources when it finishes, so a Gateway name shared with another test is deleted
3+
# and recreated back to back, and the recreated Gateway can end up without status.
4+
# xref https://github.com/envoyproxy/gateway/issues/8677
15
apiVersion: gateway.networking.k8s.io/v1
26
kind: Gateway
37
metadata:
4-
name: internet-gateway
8+
name: internet-gateway-for-hr-status
59
namespace: gateway-conformance-infra
610
spec:
711
gatewayClassName: internet
@@ -81,7 +85,7 @@ metadata:
8185
namespace: gateway-conformance-infra
8286
spec:
8387
parentRefs:
84-
- name: internet-gateway
88+
- name: internet-gateway-for-hr-status
8589
sectionName: http
8690
- name: private-gateway-for-hr-status
8791
sectionName: http

test/e2e/testdata/policy-status-multiple-gc.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
# The Gateways below are named for this test alone. The suite deletes a test's
2+
# resources when it finishes, so a Gateway name shared with another test is deleted
3+
# and recreated back to back, and the recreated Gateway can end up without status.
4+
# xref https://github.com/envoyproxy/gateway/issues/8677
15
apiVersion: gateway.networking.k8s.io/v1
26
kind: Gateway
37
metadata:
4-
name: internet-gateway
8+
name: internet-gateway-for-pol-status
59
namespace: gateway-conformance-infra
610
spec:
711
gatewayClassName: internet
@@ -37,7 +41,7 @@ spec:
3741
targetRefs:
3842
- group: gateway.networking.k8s.io
3943
kind: Gateway
40-
name: internet-gateway
44+
name: internet-gateway-for-pol-status
4145
sectionName: http
4246
- group: gateway.networking.k8s.io
4347
kind: Gateway

test/e2e/tests/multiple_gc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ var HTTPRouteStatusAggregatesAcrossGatewayClassesTest = suite.ConformanceTest{
100100
t.Run("httproute status aggregates across gateway classes", func(t *testing.T) {
101101
ns := "gateway-conformance-infra"
102102
routeNN := types.NamespacedName{Name: "multiple-gc-route", Namespace: ns}
103-
internetGatewayNN := types.NamespacedName{Name: "internet-gateway", Namespace: ns}
103+
internetGatewayNN := types.NamespacedName{Name: "internet-gateway-for-hr-status", Namespace: ns}
104104
privateGatewayNN := types.NamespacedName{Name: "private-gateway-for-hr-status", Namespace: ns}
105105

106106
_, err := kubernetes.WaitForGatewayAddress(t, suite.Client, suite.TimeoutConfig, kubernetes.NewGatewayRef(internetGatewayNN))
@@ -131,7 +131,7 @@ var PolicyStatusAggregatesAcrossGatewayClassesTest = suite.ConformanceTest{
131131
t.Run("backendtrafficpolicy status aggregates across gateway classes", func(t *testing.T) {
132132
ns := "gateway-conformance-infra"
133133
policyNN := types.NamespacedName{Name: "multiple-gc-btp", Namespace: ns}
134-
internetGatewayNN := types.NamespacedName{Name: "internet-gateway", Namespace: ns}
134+
internetGatewayNN := types.NamespacedName{Name: "internet-gateway-for-pol-status", Namespace: ns}
135135
privateGatewayNN := types.NamespacedName{Name: "private-gateway-for-pol-status", Namespace: ns}
136136

137137
_, err := kubernetes.WaitForGatewayAddress(t, suite.Client, suite.TimeoutConfig, kubernetes.NewGatewayRef(internetGatewayNN))

0 commit comments

Comments
 (0)