From 9cfd6aeae75250c080b8defed7cdb30072dfc6ac Mon Sep 17 00:00:00 2001 From: Yusuke KUOKA Date: Mon, 4 Feb 2019 15:45:58 +0900 Subject: [PATCH] Ensure helm-diff is installed for integration testing --- test/integration/run.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/integration/run.sh b/test/integration/run.sh index 570efa15..552774f1 100755 --- a/test/integration/run.sh +++ b/test/integration/run.sh @@ -47,6 +47,7 @@ set -e info "Using namespace: ${test_ns}" info "Using Helm version: $(helm version --short --client | grep -o v.*$)" ${helm} init --wait --override spec.template.spec.automountServiceAccountToken=true +${helm} plugin install https://github.com/databus23/helm-diff --version master ${kubectl} get namespace ${test_ns} &> /dev/null && warn "Namespace ${test_ns} exists, from a previous test run?" $kubectl create namespace ${test_ns} || fail "Could not create namespace ${test_ns}" trap "{ $kubectl delete namespace ${test_ns}; }" EXIT # remove namespace whenever we exit this script @@ -57,9 +58,7 @@ trap "{ $kubectl delete namespace ${test_ns}; }" EXIT # remove namespace wheneve test_start "happypath - simple rollout of httpbin chart" info "Diffing ${dir}/happypath.yaml" -${helmfile} -f ${dir}/happypath.yaml diff --detailed-exitcode -code=$? -[ ${code} -eq 2 ] || fail "unexpected exit code returned by helmfile diff: ${code}" +bash -c "${helmfile} -f ${dir}/happypath.yaml diff --detailed-exitcode; code="'$?'"; [ "'${code}'" -eq 2 ]" || fail "unexpected exit code returned by helmfile diff" info "Templating ${dir}/happypath.yaml" ${helmfile} -f ${dir}/happypath.yaml template