ceph-csi/run-k8s-external-storage-e2e.sh
Niels de Vos 4b04e2b426 ci: add script to run external-storage e2e tests
The run-k8s-external-storage-e2e.sh script downloads the kubernetes-test
components, creates a configuration for RBD and CephFS drivers and runs
the external-storage tests on the current cluster.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2020-10-23 09:30:14 +00:00

26 lines
825 B
Bash
Executable File

#!/bin/sh
#
# Download the Kubernetes test suite, extract it and run the external-storage suite.
#
# Requirements:
# - KUBE_VERSION needs to be set in the environment (format: "v1.18.5")
# exit on failure
set -e
[ -n "${KUBE_VERSION}" ] || { echo "KUBE_VERSION not set" ; exit 1 ; }
# download and extract the tests
curl -LO "https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/kubernetes-test-linux-amd64.tar.gz"
tar xzf kubernetes-test-linux-amd64.tar.gz kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test
for driver in /opt/build/go/src/github.com/ceph/ceph-csi/scripts/k8s-storage/driver-*.yaml
do
kubernetes/test/bin/ginkgo \
-focus="External.Storage.*.csi.ceph.com" \
-skip='\[Feature:|\[Disruptive\]' \
kubernetes/test/bin/e2e.test \
-- \
-storage.testdriver="${driver}"
done