Skip to content

Commit 3cc7e3f

Browse files
SinaChavoshiahg-g
andauthored
feat(conformance): Add test execution instruction to the guide. (#878)
* Add test execution instruction to the guide. * separate test setup to a different read me file. * fix boilerplate header * fix prerequisites * update overview * remove cluster Setup and Verification * use your_gatewayclass_name * move guide to site-src/guides/ * add a link from implementers guide * update based on feedback * update epp requirements * Update site-src/guides/conformance-tests.md --------- Co-authored-by: Abdullah Gharaibeh <[email protected]>
1 parent f66be2d commit 3cc7e3f

File tree

4 files changed

+52
-1
lines changed

4 files changed

+52
-1
lines changed

conformance/reports/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This directory stores conformance reports submitted by various implementations o
66

77
This folder stores conformance reports organized first by the version of the Gateway API Inference Extension specification they were tested against, and then by the specific conformance profile (e.g., Gateway, EPP, Model Server):
88

9+
```
910
|-- conformance/reports
1011
| |-- v0.3.0 # Example extension version
1112
| | |-- gateway # Conformance profile/category
@@ -22,6 +23,7 @@ This folder stores conformance reports organized first by the version of the Gat
2223
| | | |-- ...
2324
| |-- v0.4.0 # Future extension version
2425
| | |-- ...
26+
```
2527

2628
## Implementation Submissions
2729

mkdocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ nav:
7171
- Configuration Guide:
7272
- Prefix Cache Aware Plugin: guides/epp-configuration/prefix-aware.md
7373
- Implementer's Guide: guides/implementers.md
74+
- Implementer Guides:
75+
- Getting started: guides/implementers.md
76+
- Conformance Tests: guides/conformance-tests.md
7477
- Performance:
7578
- Benchmark: performance/benchmark/index.md
7679
- Regression Testing: performance/regression-testing/index.md

site-src/guides/conformance-tests.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
2+
# Test Setup and Execution
3+
4+
This document provides steps to run the Gateway API Inference Extension conformance tests.
5+
6+
## Prerequisites
7+
8+
1. You need a Kubernetes cluster with [LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) support.
9+
10+
2. Choose an Implementation -
11+
Install an [existing implementation](https://gateway-api-inference-extension.sigs.k8s.io/implementations/gateways/). For setup instructions, refer to the [The Quickstart Guide](https://gateway-api-inference-extension.sigs.k8s.io/guides/). Alternatively run tests against your implementation after completing the [implementer's guide](https://gateway-api-inference-extension.sigs.k8s.io/guides/implementers/#implementers-guide).
12+
13+
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.
14+
15+
## Running Conformance Tests
16+
17+
1. **Clone the Repository**:
18+
Create a local copy of the Gateway API Inference Extension repository:
19+
```bash
20+
git clone https://github.com/kubernetes-sigs/gateway-api-inference-extension.git
21+
cd gateway-api-inference-extension
22+
```
23+
24+
2. **Execute Tests**:
25+
Run the following command to execute all available tests. Replace `<your_gatewayclass_name>` with the GatewayClass used by the implementation under test.
26+
27+
```bash
28+
go test ./conformance -args -gateway-class <your_gatewayclass_name>
29+
```
30+
31+
### Test Execution Options
32+
33+
* **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.
34+
```bash
35+
go test ./conformance -args -gateway-class <your_gatewayclass_name> -cleanup-base-resources=false
36+
```
37+
38+
* **Running Specific Tests**: To run a specific test, you can reference the test name by using the `-run-test` flag. For example:
39+
```bash
40+
go test ./conformance -args -gateway-class <your_gatewayclass_name> -run-test HTTPRouteMultipleGatewaysDifferentPools
41+
```
42+
43+
* **Detailed Logging**: To view detailed logs, you can enable logging mode by adding the `-v` as well as `-debug` flags.
44+
```bash
45+
go test -v ./conformance -args -debug -gateway-class <your_gatewayclass_name> -cleanup-base-resources=false -run-test HTTPRouteMultipleGatewaysDifferentPools
46+
```

site-src/guides/implementers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,4 +110,4 @@ Here are some tips for testing your controller end-to-end:
110110

111111
### Conformance Tests
112112

113-
A set of conformance tests will be developed soon to help verify that a controller is working as expected. This guide will be updated once we have more information. Stay tuned!
113+
See [Conformance Test Setup and Execution](https://gateway-api-inference-extension.sigs.k8s.io/guides/conformance-tests).

0 commit comments

Comments
 (0)