Test Setup and Execution¶
This document provides steps to run the Gateway API Inference Extension conformance tests.
Prerequisites¶
- 
You need a Kubernetes cluster with LoadBalancer support. 
- 
Choose an Implementation - Install an existing implementation. For setup instructions, refer to the The Quickstart Guide. Alternatively run tests against your implementation after completing the implementer's guide. 
Note: Since the EPP (EndPoint Picker) takes the InferencePool name as an environment variable, each conformance test creates a corresponding EPP deployment for each InferencePool it defines. For conformance testing, the EPP is configured with the HeaderBasedTestingFilter. This is enabled by setting the ENABLE_REQ_HEADER_BASED_SCHEDULER_FOR_TESTING=true environment variable in the EPP deployment manifest. 
Running Conformance Tests¶
- 
Clone the Repository: Create a local copy of the Gateway API Inference Extension repository: git clone https://github.com/kubernetes-sigs/gateway-api-inference-extension.git cd gateway-api-inference-extension
- 
Execute Tests: Run the following command to execute all available tests. Replace <your_gatewayclass_name>with the GatewayClass used by the implementation under test.go test ./conformance -args -gateway-class <your_gatewayclass_name>
Test Execution Options¶
- 
Speeding up Reruns: For repeated runs, you can add the flag -cleanup-base-resources=false. This will preserve resources such as namespaces and gateways between test runs, speeding up the process.go test ./conformance -args -gateway-class <your_gatewayclass_name> -cleanup-base-resources=false
- 
Running Specific Tests: To run a specific test, you can reference the test name by using the -run-testflag. For example:go test ./conformance -args -gateway-class <your_gatewayclass_name> -run-test HTTPRouteMultipleGatewaysDifferentPools
- 
Detailed Logging: To view detailed logs, you can enable logging mode by adding the -vas well as-debugflags.go test -v ./conformance -args -debug -gateway-class <your_gatewayclass_name> -cleanup-base-resources=false -run-test HTTPRouteMultipleGatewaysDifferentPools