diff --git a/test/run-helm-tests.sh b/test/run-helm-tests.sh index 00d0b3a452..29063fab9a 100644 --- a/test/run-helm-tests.sh +++ b/test/run-helm-tests.sh @@ -15,8 +15,7 @@ #!/bin/bash # This runs helm tests for a release using `helm test` command -K8S_VERSION=${KUBERNETES_VERSION:-v1.18.2} -curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/${K8S_VERSION}/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ +K8S_VERSION=${KUBERNETES_VERSION:-v1.20.2} wget https://github.com/kubernetes-sigs/kind/releases/download/v0.9.0/kind-linux-amd64 chmod +x kind-linux-amd64 mv kind-linux-amd64 kind @@ -24,12 +23,12 @@ export PATH=$PATH:$PWD kind create cluster --image kindest/node:"${K8S_VERSION}" --config=./hack/kind_config.yaml helm install descheduler-ci --namespace kube-system ./charts/descheduler -helm test descheduler-ci +helm test descheduler-ci --namespace kube-system last_status=$? -if [[ ! "${last_satus}" ]]; then +if [[ "${last_status}" -eq 1 ]]; then echo "Helm test failed" exit 1 fi echo "Helm test verified." -kind delete cluster -v +kind delete cluster