-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Test caseNew test caseNew test caseenhancementImprovement to existing testImprovement to existing test
Description
Summary
Implement GRPCRoute class, route factory, and fixture parametrization so that existing tests can run against both HTTPRoute and GRPCRoute. This includes parametrizing baseline smoke tests, extension policy tests, and adding GRPCRoute-specific tests.
Motivation
The GRPCRoute support RFC requires E2E test coverage for all Kuadrant policies targeting GRPCRoute. The testsuite's existing indirect fixture parametrization pattern should be extended to support route type switching, enabling tests to run against both HTTPRoute and GRPCRoute with minimal code changes.
Implementation
GRPCRoute Class & Route Factory
- Create
GRPCMethodMatchandGRPCRouteMatchdataclasses intestsuite/gateway/__init__.py - Implement
GRPCRouteclass intestsuite/gateway/gateway_api/grpc_route.pyimplementingGatewayRoute - Implement route factory method for route type selection
Fixture Parametrization
Extend fixtures in testsuite/tests/singlecluster/conftest.py:
routefixture: support GRPCRoute creation via@pytest.mark.parametrize("route", ["http", "grpc"], indirect=True)backendfixture: switch between httpbin and gRPC backend based on route typeclientfixture: switch between HTTP and gRPC client based on route type
Baseline Tests to Parametrize
Data plane & infrastructure policy tests (make smoke):
tests/singlecluster/authorino/identity/api_key/test_auth_credentials.py::test_custom_selector[authorizationHeader]tests/singlecluster/gateway/test_basic.py::test_gateway_readinesstests/singlecluster/limitador/test_basic_limit.py::test_limit[2 requests every 15 sec-route]tests/singlecluster/limitador/test_basic_limit.py::test_limit[2 requests every 15 sec-gateway]tests/singlecluster/gateway/test_basic.py::test_gateway_basic_dns_tls
Extension policy tests:
tests/singlecluster/extensions/telemetry_policy/test_telemetry_policy_api_key_auth.py— TelemetryPolicy custom labels with API key authtests/singlecluster/extensions/plan_policy/test_plan_policy.py— PlanPolicy tier enforcement with Keycloak OIDCtests/singlecluster/extensions/oidc_policy/test_oidc_policy_public_client.py— OIDCPolicy public client PKCE flow
GRPCRoute-Specific Tests
- GRPCRoute sectionName targeting tests (AuthPolicy + RateLimitPolicy)
- GRPCRoute service/method matching tests
- Mixed HTTPRoute + GRPCRoute on same Gateway
- DNSPolicy/TLSPolicy verification with Gateway having attached GRPCRoutes
Tasks
GRPCRouteclass implementsGatewayRouteinterface- Route factory method selects correct route class based on parametrization
route,backend, andclientfixtures support GRPCRoute switching- All baseline smoke tests pass with GRPCRoute parametrization
- Extension policy baseline tests (TelemetryPolicy, PlanPolicy, OIDCPolicy) pass with GRPCRoute parametrization
- GRPCRoute sectionName targeting tests added
- GRPCRoute-specific tests added (service/method matching on grpcroute, mixed routes)
Dependencies
- [GRPC Route] Investigate and select gRPC backend for testing ([GRPCRoute] Investigate and select gRPC backend for testing #889)
- [GRPC Route] Investigate and select gRPC client library ([GRPCRoute] Investigate and select gRPC client library #890)
- kuadrant-operator Tasks 4-7 (GRPCRoute support for data plane, extension, and discoverability)
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Test caseNew test caseNew test caseenhancementImprovement to existing testImprovement to existing test
Type
Projects
Status
🆕 New
Status
No status