github.com/cilium/cilium@v1.16.2/operator/pkg/gateway-api/conformance_test.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright Authors of Cilium 3 4 package gateway_api 5 6 import ( 7 "testing" 8 9 "sigs.k8s.io/gateway-api/conformance" 10 11 "github.com/cilium/cilium/pkg/testutils" 12 ) 13 14 // TestConformance runs the conformance tests for Gateway API 15 // Adapted from https://github.com/kubernetes-sigs/gateway-api/blob/main/conformance/conformance_test.go 16 // Some features are not supported by Cilium, so we skip them. 17 // This test should be adjusted as new features are added to the Gateway API. 18 // 19 // The below command can be used to run the conformance tests locally, you can also run directly from 20 // IDEs (e.g. Goland, VSCode) with the same settings. 21 // 22 // GATEWAY_API_CONFORMANCE_TESTS=1 go test -v ./operator/pkg/gateway-api \ 23 // --gateway-class cilium \ 24 // --supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPResponseHeaderModification,RouteDestinationPortMatching,GatewayClassObservedGenerationBump \ 25 // --debug -test.run "TestConformance" 26 // 27 // You can also pass -test.run to run a specific test 28 // 29 // GATEWAY_API_CONFORMANCE_TESTS=1 go test -v ./operator/pkg/gateway-api \ 30 // --gateway-class cilium \ 31 // --supported-features ReferenceGrant,TLSRoute,HTTPRouteQueryParamMatching,HTTPRouteMethodMatching,HTTPResponseHeaderModification,RouteDestinationPortMatching,GatewayClassObservedGenerationBump \ 32 // --debug -test.run "TestConformance/HTTPRouteDisallowedKind" 33 func TestConformance(t *testing.T) { 34 testutils.GatewayAPIConformanceTest(t) 35 36 conformance.RunConformance(t) 37 }