Skip to content

Commit

Permalink
gha: Update Gateway API Conformance test
Browse files Browse the repository at this point in the history
This commit is to update GHA Gateway API conformance test as per below:

- Use experimental CRDs mainly for running tests for all features.
- Remove -debug flag as it's too verbose.
- Limit number of concurrency test from default (e.g. 8) to 4 to minimize
  overlapping between the tests.
- Enable GatewayClassObservedGenerationBump feature.

Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras committed Feb 22, 2023
1 parent 7edbde7 commit 63b386c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/conformance-gateway-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ jobs:
- name: Install Gateway API CRDs
run: |
# Install Gateway CRDs
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/standard/gateway.networking.k8s.io_gatewayclasses.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/standard/gateway.networking.k8s.io_gateways.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/standard/gateway.networking.k8s.io_httproutes.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/standard/gateway.networking.k8s.io_referencegrants.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/experimental/gateway.networking.k8s.io_gatewayclasses.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/experimental/gateway.networking.k8s.io_gateways.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/experimental/gateway.networking.k8s.io_httproutes.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${{ env.gateway_api_version }}/config/crd/experimental/gateway.networking.k8s.io_referencegrants.yaml
# To make sure that Gateway API CRs are available
kubectl wait --for condition=Established crd/gatewayclasses.gateway.networking.k8s.io --timeout=${{ env.timeout }}
Expand Down Expand Up @@ -135,10 +135,12 @@ jobs:
- name: Run Gateway API conformance test
timeout-minutes: 30
run: |
GATEWAY_API_CONFORMANCE_TESTS=1 go test -v ./operator/pkg/gateway-api \
GATEWAY_API_CONFORMANCE_TESTS=1 go test \
-p 4 \
-v ./operator/pkg/gateway-api \
--gateway-class cilium \
--supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,RouteDestinationPortMatching \
--debug -test.run "TestConformance"
--supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,RouteDestinationPortMatching,GatewayClassObservedGenerationBump \
-test.run "TestConformance"
- name: Post-test information gathering
if: ${{ !success() }}
Expand Down
4 changes: 2 additions & 2 deletions operator/pkg/gateway-api/conformance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import (
//
// GATEWAY_API_CONFORMANCE_TESTS=1 go test -v ./operator/pkg/gateway-api \
// --gateway-class cilium \
// --supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPResponseHeaderModification,RouteDestinationPortMatching \
// --supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPResponseHeaderModification,RouteDestinationPortMatching,GatewayClassObservedGenerationBump \
// --debug -test.run "TestConformance"
//
// You can also pass -test.run to run a specific test
//
// GATEWAY_API_CONFORMANCE_TESTS=1 go test -v ./operator/pkg/gateway-api \
// --gateway-class cilium \
// --supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPResponseHeaderModification,RouteDestinationPortMatching \
// --supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPResponseHeaderModification,RouteDestinationPortMatching,GatewayClassObservedGenerationBump \
// --debug -test.run "TestConformance/HTTPRouteDisallowedKind"
func TestConformance(t *testing.T) {
testutils.GatewayAPIConformanceTest(t)
Expand Down

0 comments on commit 63b386c

Please sign in to comment.