From 8396252db5cad3e504377a809dcd864bcff337c7 Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Thu, 15 Jun 2017 23:47:01 +0800 Subject: [PATCH] Add docs for CRI validation test suites Signed-off-by: Pengfei Ni --- contributors/devel/cri-validation.md | 50 ++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 contributors/devel/cri-validation.md diff --git a/contributors/devel/cri-validation.md b/contributors/devel/cri-validation.md new file mode 100644 index 00000000000..4af85b09ba1 --- /dev/null +++ b/contributors/devel/cri-validation.md @@ -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.