Skip to content

Commit

Permalink
remove kubectl download, update helm-test command
Browse files Browse the repository at this point in the history
  • Loading branch information
pravarag committed Mar 23, 2021
1 parent bafa125 commit b2e7a3b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/run-helm-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,20 @@
#!/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
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

0 comments on commit b2e7a3b

Please sign in to comment.