From 2fed1cb3a9f575d99be15b0a417c242698d240b2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 20 May 2026 01:49:27 +0000 Subject: [PATCH] test: harden release block parsing in issue-2599 case 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/integration/test-cases/issue-2599-default-inherit.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/integration/test-cases/issue-2599-default-inherit.sh b/test/integration/test-cases/issue-2599-default-inherit.sh index dcce206f..b7551fb1 100644 --- a/test/integration/test-cases/issue-2599-default-inherit.sh +++ b/test/integration/test-cases/issue-2599-default-inherit.sh @@ -32,6 +32,8 @@ grep -q "app2" ${issue_2599_tmp}/output.log \ # 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 +[ -s ${issue_2599_tmp}/app1.log ] || fail "failed to extract release app1 section from build output" +[ -s ${issue_2599_tmp}/app2.log ] || fail "failed to extract release app2 section from build output" grep -q 'managed: "true"' ${issue_2599_tmp}/app1.log \ || fail "release app1 should inherit managed label from default template" @@ -39,8 +41,9 @@ 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" +if grep -q 'managed: "true"' ${issue_2599_tmp}/app2.log; then + fail "release app2 should not inherit managed label due to except" +fi # Test 2: non-existent template in defaultInherit should fail info "Running helmfile build with non-existent defaultInherit template"