Files
Etienne Champetier 4bdb6f097c fix: keep all chart dependencies key / values (#2501)
* feat: Refactor TestRewriteChartDependencies

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>

* fix: keep all chart dependencies key / values

In rewriteChartDependencies we were only parsing name / repository / version,
thus dropping keys like condition / import-values.

This at least fixes the use of condition.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>

---------

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2026-03-26 13:16:54 +08:00

14 lines
664 B
Bash

chart_deps_condition_input_dir="${cases_dir}/chart-deps-condition/input"
chart_deps_condition_tmp=$(mktemp -d)
actual=${chart_deps_condition_tmp}/actual.yaml
expected="${cases_dir}/chart-deps-condition/output/template"
test_start "chart with dependencies and condition"
# --concurrency 1 is a workaround for https://github.com/helmfile/helmfile/issues/2502
${helmfile} -f ${chart_deps_condition_input_dir}/helmfile.yaml template --skip-deps --concurrency 1 > ${actual} || fail "\"helmfile template\" shouldn't fail"
./dyff between -bs ${expected} ${actual} || fail "\"helmfile template\" should be consistent"
test_pass "chart with dependencies and condition"