diff --git a/tests/scripts/helm.sh b/tests/scripts/helm.sh index 513ea9666..3f949c8aa 100755 --- a/tests/scripts/helm.sh +++ b/tests/scripts/helm.sh @@ -59,7 +59,7 @@ install() { sleep 10 (( ++INC )) helm_ready=$(kubectl get pods -l app=helm -n kube-system -o jsonpath='{.items[0].status.phase}') - echo "helm pod status: $(helm_ready)" + echo "helm pod status: ${helm_ready}" done if [ "${helm_ready}" != "Running" ]; then @@ -83,6 +83,13 @@ install() { } helm_reset() { + if ! helm_loc="$(type -p "helm")" || [[ -z ${helm_loc} ]]; then + local dist + dist="$(uname -s)" + # shellcheck disable=SC2021 + dist=$(echo "${dist}" | tr "[A-Z]" "[a-z]") + HELM="${temp}/${dist}-${arch}/helm" + fi "${HELM}" reset # shellcheck disable=SC2021 pgrep "${HELM}" | grep -v grep | awk '{print $2}'| xargs kill -9