refresh cri testing guide after move

Signed-off-by: Mike Brown <brownwm@us.ibm.com>
This commit is contained in:
Mike Brown 2020-10-30 18:18:29 -05:00
parent 3662dc4c0b
commit 1ab8bdc27b

View File

@ -1,58 +1,34 @@
CRI Plugin Testing Guide CRI Plugin Testing Guide
======================== ========================
This document assumes you have already setup the development environment (go, git, `containerd/cri` repo etc.). This document assumes you have already setup the development environment (go, git, `github.com/containerd/containerd` repo etc.).
Before sending pull requests you should at least make sure your changes have passed code verification, unit, integration and CRI validation tests. Before sending pull requests you should at least make sure your changes have passed code verification, unit, integration and CRI validation tests.
## Code Verification
Code verification includes lint, and code formatting check etc. ## Build
* Install tools used by code verification: Follow the [building](../BUILDING.md) instructions.
## CRI Integration Test
* Run CRI integration test:
```bash ```bash
make install.tools make cri-integration
```
***Note:*** Some make actions (like `install.tools`) use the user's `GOPATH` and will otherwise not work when it is not set. Other make actions override it by setting it to a temporary directory for release build and testing purposes.
* Run code verification:
```bash
make verify
```
## Unit Test
Run all unit tests in `containerd/cri` repo.
```bash
make test
```
## Integration Test
Run all integration tests in `containerd/cri` repo.
* [Install dependencies](../README.md#install-dependencies).
* Run integration test:
```bash
make test-integration
``` ```
## CRI Validation Test ## CRI Validation Test
[CRI validation test](https://github.com/kubernetes/community/blob/master/contributors/devel/cri-validation.md) is a test framework for validating that a Container Runtime Interface (CRI) implementation such as containerd with the `cri` plugin meets all the requirements necessary to manage pod sandboxes, containers, images etc. [CRI validation test](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/validation.md) is a test framework for validating that a Container Runtime Interface (CRI) implementation such as containerd with the `cri` plugin meets all the requirements necessary to manage pod sandboxes, containers, images etc.
CRI validation test makes it possible to verify CRI conformance of `containerd/cri` without setting up Kubernetes components or running Kubernetes end-to-end tests. CRI validation test makes it possible to verify CRI conformance of `containerd` without setting up Kubernetes components or running Kubernetes end-to-end tests.
* [Install dependencies](../README.md#install-dependencies). * [Install dependencies](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/validation.md#install).
* Build containerd with the `cri` plugin: * Run the containerd you built above with the `cri` plugin built in:
```bash ```bash
make containerd -l debug
```
* Run CRI validation test:
```bash
make test-cri
```
* Focus or skip specific CRI validation test:
```bash
make test-cri FOCUS=REGEXP_TO_FOCUS SKIP=REGEXP_TO_SKIP
``` ```
* Run CRI [validation](https://github.com/kubernetes-sigs/cri-tools/blob/master/docs/validation.md#run) test.
[More information](https://github.com/kubernetes-sigs/cri-tools) about CRI validation test. [More information](https://github.com/kubernetes-sigs/cri-tools) about CRI validation test.
## Node E2E Test ## Node E2E Test
[Node e2e test](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md) is a test framework testing Kubernetes node level functionalities such as managing pods, mounting volumes etc. It starts a local cluster with Kubelet and a few other minimum dependencies, and runs node functionality tests against the local cluster. [Node e2e test](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md) is a test framework testing Kubernetes node level functionalities such as managing pods, mounting volumes etc. It starts a local cluster with Kubelet and a few other minimum dependencies, and runs node functionality tests against the local cluster.
* [Install dependencies](../README.md#install-dependencies).
* Run node e2e test: Currently e2e-node tests are supported from via Pull Request comments on github.
```bash Enter "/test all" as a comment on a pull request for a list of testing options that have been integrated through prow bot with kubernetes testing services hosted on GCE.
make test-e2e-node Typing `/test pull-containerd-node-e2e` will start a node e2e test run on your pull request commits.
```
* Focus or skip specific node e2e test:
```bash
make test-e2e-node FOCUS=REGEXP_TO_FOCUS SKIP=REGEXP_TO_SKIP
```
[More information](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md) about Kubernetes node e2e test. [More information](https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-node-tests.md) about Kubernetes node e2e test.