2020-08-26 14:39:59 +00:00
|
|
|
#!/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
|
2024-09-12 09:27:06 +00:00
|
|
|
curl -LO "https://dl.k8s.io/${KUBE_VERSION}/kubernetes-test-linux-amd64.tar.gz"
|
2020-08-26 14:39:59 +00:00
|
|
|
tar xzf kubernetes-test-linux-amd64.tar.gz kubernetes/test/bin/ginkgo kubernetes/test/bin/e2e.test
|
|
|
|
|
2020-10-28 13:49:17 +00:00
|
|
|
# e2e depends on a self-contained KUBECONFIG for some reason
|
|
|
|
KUBECONFIG_TMP="$(mktemp -t kubeconfig.XXXXXXXX)"
|
|
|
|
kubectl config view --raw --flatten > "${KUBECONFIG_TMP}"
|
|
|
|
export KUBECONFIG="${KUBECONFIG_TMP}"
|
|
|
|
|
2020-08-26 14:39:59 +00:00
|
|
|
for driver in /opt/build/go/src/github.com/ceph/ceph-csi/scripts/k8s-storage/driver-*.yaml
|
|
|
|
do
|
|
|
|
kubernetes/test/bin/ginkgo \
|
2024-04-04 13:34:38 +00:00
|
|
|
--vv \
|
2020-08-26 14:39:59 +00:00
|
|
|
-focus="External.Storage.*.csi.ceph.com" \
|
2021-06-30 12:20:44 +00:00
|
|
|
-skip='\[Feature:|\[Disruptive\]|Generic Ephemeral-volume' \
|
2020-08-26 14:39:59 +00:00
|
|
|
kubernetes/test/bin/e2e.test \
|
|
|
|
-- \
|
|
|
|
-storage.testdriver="${driver}"
|
|
|
|
done
|