-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for CRI validation test suites
Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
- Loading branch information
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,50 @@ | ||
# CRI Validation Testing | ||
|
||
CRI validation testing provides a serial of common validation test suites for Kubelet CRI (_Container Runtime Interface_). | ||
|
||
It helps container runtime maintainers to validate their runtime when integrating with kubelet CRI. | ||
|
||
*Note: No kubelet is running. The test suites run directly targeting the shim of container runtime.* | ||
|
||
*Note: CRI validation testing is alpha and maintained at [cri-tools](https://github.com/kubernetes-incubator/cri-tools) repo.* | ||
|
||
## Install | ||
|
||
The test suites could be installed easily via `go get` command: | ||
|
||
```sh | ||
go get github.com/kubernetes-incubator/cri-tools/cmd/critest | ||
``` | ||
|
||
Then `critest` binary could be found in `$GOPATH/bin`. | ||
|
||
*Note: ensure GO is installed and GOPATH is set before installing critest.* | ||
|
||
## Running tests | ||
|
||
Before running the tests, ensure the shim of CRI container runtime is running and kubelet is stopped. | ||
|
||
Run: | ||
|
||
```sh | ||
critest validation | ||
``` | ||
|
||
This will | ||
|
||
- Connect to the shim of CRI container runtime | ||
- Run the tests using `ginkgo` | ||
- Output the test results to STDOUT | ||
|
||
critest connects to `/var/run/dockershim.sock` by default. For other runtimes, the endpoint could be set in two ways: | ||
|
||
- By setting flags `--runtime-endpoint` and `--image-endpoint` | ||
- By setting environment variables `CRI_RUNTIME_ENDPOINT` and `CRI_IMAGE_ENDPOINT` | ||
|
||
## Additional options | ||
|
||
- `--focus`, `-f`: Only run the tests that match the regular expression. | ||
- -`-ginkgo-flags`, `-g`: Space-separated list of arguments to pass to Ginkgo test runner. | ||
- `--image-endpoint`, `-i`: Set the endpoint of image service. Same with runtime-endpoint if not specified. | ||
- `--runtime-endpoint`, `-r`: Set the endpoint of runtime service. Default to `/var/run/dockershim.sock`. | ||
- `--skip`, `-s`: Skip the tests that match the regular expression. |