generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 180
feat(conformance): Add test execution instruction to the guide. #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8c9463f
Add test execution instruction to the guide.
SinaChavoshi 7ce6fd1
separate test setup to a different read me file.
SinaChavoshi bb257fd
fix boilerplate header
SinaChavoshi fc2a410
Merge remote-tracking branch 'upstream/main'
SinaChavoshi 6310fdf
fix prerequisites
SinaChavoshi 8190e64
update overview
SinaChavoshi 5794920
remove cluster Setup and Verification
SinaChavoshi 2ec4965
use your_gatewayclass_name
SinaChavoshi fee10bf
move guide to site-src/guides/
SinaChavoshi 16d8ebc
add a link from implementers guide
SinaChavoshi d34457a
Merge remote-tracking branch 'upstream/main'
SinaChavoshi 753917a
Merge remote-tracking branch 'upstream/main'
SinaChavoshi e4ad41f
Merge branch 'main' into user_guide
SinaChavoshi 2d5b896
update based on feedback
SinaChavoshi d5530dc
Merge remote-tracking branch 'upstream/main'
SinaChavoshi b57fb8a
Merge remote-tracking branch 'upstream/main'
SinaChavoshi a61eebb
Merge branch 'main' into user_guide
SinaChavoshi 6a13dc5
update epp requirements
SinaChavoshi e98b5ac
Update site-src/guides/conformance-tests.md
ahg-g File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
# Test Setup and Execution | ||
|
||
This document provides steps to run the Gateway API Inference Extension conformance tests. | ||
|
||
## Prerequisites | ||
|
||
1. You need a Kubernetes cluster with [LoadBalancer](https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer) support. | ||
|
||
2. Choose an Implementation - | ||
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). | ||
|
||
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 | ||
|
||
1. **Clone the Repository**: | ||
Create a local copy of the Gateway API Inference Extension repository: | ||
```bash | ||
git clone https://github.com/kubernetes-sigs/gateway-api-inference-extension.git | ||
cd gateway-api-inference-extension | ||
``` | ||
|
||
2. **Execute Tests**: | ||
Run the following command to execute all available tests. Replace `<your_gatewayclass_name>` with the GatewayClass used by the implementation under test. | ||
|
||
```bash | ||
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. | ||
```bash | ||
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-test` flag. For example: | ||
```bash | ||
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 `-v` as well as `-debug` flags. | ||
```bash | ||
go test -v ./conformance -args -debug -gateway-class <your_gatewayclass_name> -cleanup-base-resources=false -run-test HTTPRouteMultipleGatewaysDifferentPools | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.