From 8242011307e4feb690cf20662d9ff5607a9933bf Mon Sep 17 00:00:00 2001 From: Satoru Takeuchi Date: Wed, 2 Sep 2020 00:03:48 +0900 Subject: [PATCH] ci: add the descriptions of important environment variables Some environment variables are mandatory to run the integration test. Signed-off-by: Satoru Takeuchi --- tests/README.md | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/README.md b/tests/README.md index 72abc7e77..1e8bf1bca 100644 --- a/tests/README.md +++ b/tests/README.md @@ -34,7 +34,7 @@ tests/scripts/minikube.sh up ``` To copy Rook images generated from your local build into the Minikube VM, run the following commands after `minikube.sh up` succeeded: -``` +```console tests/scripts/minikube.sh update tests/scripts/minikube.sh helm ``` @@ -51,6 +51,12 @@ tests/scripts/kubeadm.sh up ``` `kubeadm.sh` starts Kubernetes on the host, so all the images generated by your local build should be available to the cluster without any additional commands. +You can change the Kubernetes version (default is v1.15.12) with `KUBE_VERSION` environment variable. Here is the example of using Kubernetes v1.19.0. + +```console +export KUBE_VERSION=v1.19.0 +tests/scripts/kubeadm.sh up +``` Please note that this script may downgrade the following deb packages. @@ -105,11 +111,25 @@ tests/scripts/helm.sh up Some settings are available to run the tests under different environments. The settings are all configured with environment variables. See [environment.go](/tests/framework/installer/environment.go) for the available environment variables. +At least you should set the following variables. + +```console +export TEST_HELM_PATH=/tmp/rook-tests-scripts-helm/linux-amd64/helm +export TEST_BASE_DIR=WORKING_DIR +export TEST_SCRATCH_DEVICE= # for example, TEST_SCRATCH_DEVICE=/dev/sdb +``` + +Please note that the integration test erase the contents of TEST_SCRATCH_DEVICE. To run all integration tests: ``` go test -v -timeout 1800s github.com/rook/rook/tests/integration ``` +In addition, you can test only one storage provider. For example, you can skip but Ceph tests as follows. + +```console +export STORAGE_PROVIDER_TESTS=ceph +``` To run a specific suite (uses regex): ```