test: fix "Ensure helmfile fails when no helm-secrets is installed" test

This commit is contained in:
Andrey Tuzhilin
2021-03-23 17:19:40 +09:00
committed by Yusuke Kuoka
parent 0c9934c357
commit 781c4e9ebe
+4 -4
View File
@@ -139,6 +139,10 @@ if [[ helm_major_version -eq 3 ]]; then
test_start "secretssops"
info "Encrypt secrets"
${sops} -e ${dir}/env-1.secrets.yaml > ${dir}/tmp/env-1.secrets.sops.yaml || fail "${sops} failed at ${dir}/env-1.secrets.yaml"
${sops} -e ${dir}/env-2.secrets.yaml > ${dir}/tmp/env-2.secrets.sops.yaml || fail "${sops} failed at ${dir}/env-2.secrets.yaml"
info "Ensure helm-secrets is not installed"
${helm} plugin rm secrets || true
@@ -148,10 +152,6 @@ if [[ helm_major_version -eq 3 ]]; then
info "Ensure helm-secrets is installed"
${helm} plugin install https://github.com/jkroepke/helm-secrets --version v3.5.0
info "Encrypt secrets"
${sops} -e ${dir}/env-1.secrets.yaml > ${dir}/tmp/env-1.secrets.sops.yaml || fail "${sops} failed"
${sops} -e ${dir}/env-2.secrets.yaml > ${dir}/tmp/env-2.secrets.sops.yaml || fail "${sops} failed"
info "Ensure helmfile succeed when helm-secrets is installed"
${helmfile} -f ${dir}/secretssops.yaml -e direct build || fail "\"helmfile build\" shouldn't fail"