doc: improve e2e tests guide

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
This commit is contained in:
Prasanna Kumar Kalever 2020-10-13 16:23:37 +05:30 committed by mergify[bot]
parent 3ac6bbd87c
commit fcaa332921

View File

@ -59,14 +59,26 @@ following environment variables can be exported to customize kubernetes deployme
- creating kubernetes cluster - creating kubernetes cluster
From the ceph-csi root directory, run:
```console ```console
$./minikube.sh up ./scripts/minikube.sh up
``` ```
- Teardown kubernetes cluster - Teardown kubernetes cluster
```console ```console
$./minikube.sh clean ./scripts/minikube.sh clean
```
## Deploy Rook
The cephcsi E2E tests expects that you already have rook running in your cluster.
Thanks to [minikube](../scripts/minikube.sh) script for the handy `deploy-rook` option.
```console
./scripts/minikube.sh deploy-rook
``` ```
## Test parameters ## Test parameters
@ -100,13 +112,13 @@ is greater than or equal to 1.17.0.
- Check if you have any `v1alpha1` CRD created in our Kubernetes cluster - Check if you have any `v1alpha1` CRD created in our Kubernetes cluster
```bash ```bash
[$]kubectl get crd volumesnapshotclasses.snapshot.storage.k8s.io -o yaml |grep v1alpha1 $ kubectl get crd volumesnapshotclasses.snapshot.storage.k8s.io -o yaml |grep v1alpha1
- name: v1alpha1 - name: v1alpha1
- v1alpha1 - v1alpha1
[$]kubectl get crd volumesnapshotcontents.snapshot.storage.k8s.io -o yaml |grep v1alpha1 $ kubectl get crd volumesnapshotcontents.snapshot.storage.k8s.io -o yaml |grep v1alpha1
- name: v1alpha1 - name: v1alpha1
- v1alpha1 - v1alpha1
[$]kubectl get crd volumesnapshots.snapshot.storage.k8s.io -o yaml |grep v1alpha1 $ kubectl get crd volumesnapshots.snapshot.storage.k8s.io -o yaml |grep v1alpha1
- name: v1alpha1 - name: v1alpha1
- v1alpha1 - v1alpha1
``` ```
@ -115,19 +127,19 @@ is greater than or equal to 1.17.0.
should be `v1beta1` should be `v1beta1`
```console ```console
$./install-snapshot.sh delete-crd ./scripts/install-snapshot.sh delete-crd
``` ```
- Install snapshot controller and Beta snapshot CRD - Install snapshot controller and Beta snapshot CRD
```console ```console
$./install-snapshot.sh install ./scripts/install-snapshot.sh install
``` ```
Once you are done running e2e please perform the cleanup by running following: Once you are done running e2e please perform the cleanup by running following:
```console ```console
$./install-snapshot.sh cleanup ./scripts/install-snapshot.sh cleanup
``` ```
## Running E2E ## Running E2E
@ -141,11 +153,11 @@ cluster or you can pass `kubeconfig`flag while running tests.
Functional tests are run by the `go test` command. Functional tests are run by the `go test` command.
```console ```console
$go test ./e2e/ -timeout=20m -v -mod=vendor go test ./e2e/ -timeout=20m -v -mod=vendor
``` ```
Functional tests can be invoked by `make` command You can also invoke functional tests with `make` command
```console ```console
$make func-test TESTOPTIONS="--deploy-timeout=10 -timeout=30m -v" make func-test TESTOPTIONS="-deploy-timeout=10 -timeout=30m -v"
``` ```