Skip to content

Commit

Permalink
helm_test: update script as per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pravarag committed Mar 16, 2021
1 parent c314110 commit c78ef72
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions test/run-helm-tests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2017 The Kubernetes Authors.
# Copyright 2021 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,23 +15,14 @@
#!/bin/bash

# This runs helm tests for a release using `helm test` command
if [[ -n "${KIND_E2E}" ]]; then
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/
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
export KUBECONFIG="$(kind get kubecofnig-path)"
docker pull kubernetes/pause
kind load docker-image kubernetes/pause
kind get kubeconfig > /tmp/admin.conf
export KUBECONFIG="/tmp/admin.conf"
mkdir -p ~/gopath/src/sigs.k8s.io/
mv ~/gopath/src/github.com/kubernetes-sigs/descheduler ~/gopath/src/sigs.k8s.io/.
fi
PRJ_PREFIX="sigs.k8s.io/descheduler"
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/
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
last_status=$?
Expand Down

0 comments on commit c78ef72

Please sign in to comment.