From c78ef7218de9d70a7c4cfcb4a2ea8054c0b8350b Mon Sep 17 00:00:00 2001 From: Pravar Agrawal Date: Tue, 16 Mar 2021 18:56:42 +0530 Subject: [PATCH] helm_test: update script as per review comments --- test/run-helm-tests.sh | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/test/run-helm-tests.sh b/test/run-helm-tests.sh index 89491d270f..00d0b3a452 100644 --- a/test/run-helm-tests.sh +++ b/test/run-helm-tests.sh @@ -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. @@ -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=$?