Skip to content

Commit

Permalink
Add docs for CRI validation test suites
Browse files Browse the repository at this point in the history
Signed-off-by: Pengfei Ni <feiskyer@gmail.com>
  • Loading branch information
feiskyer committed Jun 15, 2017
1 parent 6f15759 commit 8396252
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions contributors/devel/cri-validation.md
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.

0 comments on commit 8396252

Please sign in to comment.