From 55fe0804b46ff36f194ff558bae75814f86dcfdb Mon Sep 17 00:00:00 2001 From: Pengfei Ni Date: Fri, 25 May 2018 15:29:52 +0800 Subject: [PATCH] Update docs for CRI validation test suites --- contributors/devel/cri-validation.md | 35 ++++++++++++++++------------ 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/contributors/devel/cri-validation.md b/contributors/devel/cri-validation.md index 2ca5a0e040c..efb98022ad5 100644 --- a/contributors/devel/cri-validation.md +++ b/contributors/devel/cri-validation.md @@ -2,19 +2,26 @@ CRI validation testing provides a test framework and a suite of tests to validate that the Container Runtime Interface (CRI) server implementation meets all the requirements. This allows the CRI runtime developers to verify that their runtime conforms to CRI, without needing to set up Kubernetes components or run Kubernetes end-to-end tests. -CRI validation testing is currently Alpha and is hosted at the [cri-tools](https://github.com/kubernetes-incubator/cri-tools) repository. Performance benchmarking will be added in the future. We encourage the CRI developers to report bugs or help extend the test coverage by adding more tests. +CRI validation testing is GA since v1.11.0 and is hosted at the [cri-tools](https://github.com/kubernetes-incubator/cri-tools) repository. We encourage the CRI developers to report bugs or help extend the test coverage by adding more tests. ## Install -The test suites can be installed easily via `go get` command: +The test suites can be downloaded from cri-tools [release page](https://github.com/kubernetes-incubator/cri-tools/releases): ```sh -go get github.com/kubernetes-incubator/cri-tools/cmd/critest +VERSION="v1.11.0" +wget https://github.com/kubernetes-incubator/cri-tools/releases/download/$VERSION/critest-$VERSION-linux-amd64.tar.gz +sudo tar zxvf critest-$VERSION-linux-amd64.tar.gz -C /usr/local/bin +rm -f critest-$VERSION-linux-amd64.tar.gz ``` -Then `critest` binary can be found in `$GOPATH/bin`. +critest requires [ginkgo](https://github.com/onsi/ginkgo) to run parallel tests. It could be installed by -*Note: ensure GO is installed and GOPATH is set before installing critest.* +```sh +go get -u github.com/onsi/ginkgo/ginkgo +``` + +*Note: ensure GO is installed and GOPATH is set before installing ginkgo.* ## Running tests @@ -25,7 +32,7 @@ Before running the test, you need to _ensure that the CRI server under test is r ### Run ```sh -critest validation +critest ``` This will @@ -34,15 +41,13 @@ This will - 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 can be set in two ways: - -- By setting flags `--runtime-endpoint` and `--image-endpoint` -- By setting environment variables `CRI_RUNTIME_ENDPOINT` and `CRI_IMAGE_ENDPOINT` +critest connects to `unix:///var/run/dockershim.sock` by default. For other runtimes, the endpoint can be set by flags `-runtime-endpoint` and `-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. +- `-ginkgo.focus`: Only run the tests that match the regular expression. +- `-image-endpoint`: Set the endpoint of image service. Same with runtime-endpoint if not specified. +- `-runtime-endpoint`: Set the endpoint of runtime service. Default to `unix:///var/run/dockershim.sock`. +- `-ginkgo.skip`: Skip the tests that match the regular expression. +- `-parallel`: The number of parallel test nodes to run (default 1). ginkgo must be installed to run parallel tests. +- `-h`: Show help and all supported options.