From 8b2c2000ec1c1bb63f363cdce3ce264bb23f52c1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 01:48:47 +0000 Subject: [PATCH] test: tighten defaultInherit integration assertions Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d0884e8e-8b1b-456d-8250-dec1566b8a37 Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com> --- .../test-cases/issue-2599-default-inherit.sh | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/test/integration/test-cases/issue-2599-default-inherit.sh b/test/integration/test-cases/issue-2599-default-inherit.sh index dc73fdee..dcce206f 100644 --- a/test/integration/test-cases/issue-2599-default-inherit.sh +++ b/test/integration/test-cases/issue-2599-default-inherit.sh @@ -29,12 +29,21 @@ grep -q "app1" ${issue_2599_tmp}/output.log \ grep -q "app2" ${issue_2599_tmp}/output.log \ || fail "release app2 should be in output" -# Verify values from common.yaml are inherited -grep -q "common.yaml" ${issue_2599_tmp}/output.log \ - || fail "values from common.yaml should be inherited" +# Verify inherited values and labels per release +sed -n '/name: app1/,/name: app2/p' ${issue_2599_tmp}/output.log > ${issue_2599_tmp}/app1.log +sed -n '/name: app2/,/templates:/p' ${issue_2599_tmp}/output.log > ${issue_2599_tmp}/app2.log + +grep -q 'managed: "true"' ${issue_2599_tmp}/app1.log \ + || fail "release app1 should inherit managed label from default template" +grep -q "common.yaml" ${issue_2599_tmp}/app1.log \ + || fail "release app1 should inherit values from common.yaml" +grep -q "common.yaml" ${issue_2599_tmp}/app2.log \ + || fail "release app2 should inherit values from common.yaml" +grep -q 'managed: "true"' ${issue_2599_tmp}/app2.log \ + && fail "release app2 should not inherit managed label due to except" # Test 2: non-existent template in defaultInherit should fail -info "Running helmfile template with non-existent defaultInherit template" +info "Running helmfile build with non-existent defaultInherit template" cat > ${issue_2599_tmp}/bad-helmfile.yaml < ${issue_2599_tmp}/error.log 2>&1 \ - && fail "helmfile template with non-existent defaultInherit template should fail" + && fail "helmfile build with non-existent defaultInherit template should fail" grep -q "inexistent release template" ${issue_2599_tmp}/error.log \ || fail "error message should mention inexistent release template"