Ensure helm-diff is installed for integration testing
This commit is contained in:
parent
27da8a6b7a
commit
9cfd6aeae7
|
|
@ -47,6 +47,7 @@ set -e
|
||||||
info "Using namespace: ${test_ns}"
|
info "Using namespace: ${test_ns}"
|
||||||
info "Using Helm version: $(helm version --short --client | grep -o v.*$)"
|
info "Using Helm version: $(helm version --short --client | grep -o v.*$)"
|
||||||
${helm} init --wait --override spec.template.spec.automountServiceAccountToken=true
|
${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} 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}"
|
$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
|
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"
|
test_start "happypath - simple rollout of httpbin chart"
|
||||||
|
|
||||||
info "Diffing ${dir}/happypath.yaml"
|
info "Diffing ${dir}/happypath.yaml"
|
||||||
${helmfile} -f ${dir}/happypath.yaml diff --detailed-exitcode
|
bash -c "${helmfile} -f ${dir}/happypath.yaml diff --detailed-exitcode; code="'$?'"; [ "'${code}'" -eq 2 ]" || fail "unexpected exit code returned by helmfile diff"
|
||||||
code=$?
|
|
||||||
[ ${code} -eq 2 ] || fail "unexpected exit code returned by helmfile diff: ${code}"
|
|
||||||
|
|
||||||
info "Templating ${dir}/happypath.yaml"
|
info "Templating ${dir}/happypath.yaml"
|
||||||
${helmfile} -f ${dir}/happypath.yaml template
|
${helmfile} -f ${dir}/happypath.yaml template
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue