test: make issue-2599 assertions format-tolerant
Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/d0884e8e-8b1b-456d-8250-dec1566b8a37 Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
This commit is contained in:
parent
2fed1cb3a9
commit
dbc0288945
|
|
@ -28,6 +28,8 @@ grep -q "app1" ${issue_2599_tmp}/output.log \
|
|||
|
||||
grep -q "app2" ${issue_2599_tmp}/output.log \
|
||||
|| fail "release app2 should be in output"
|
||||
grep -q "^templates:" ${issue_2599_tmp}/output.log \
|
||||
|| fail "templates section should be in build output"
|
||||
|
||||
# Verify inherited values and labels per release
|
||||
sed -n '/name: app1/,/name: app2/p' ${issue_2599_tmp}/output.log > ${issue_2599_tmp}/app1.log
|
||||
|
|
@ -35,13 +37,13 @@ sed -n '/name: app2/,/templates:/p' ${issue_2599_tmp}/output.log > ${issue_2599_
|
|||
[ -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 \
|
||||
grep -Eq 'managed:[[:space:]]*"?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"
|
||||
if grep -q 'managed: "true"' ${issue_2599_tmp}/app2.log; then
|
||||
if grep -Eq 'managed:[[:space:]]*"?true"?' ${issue_2599_tmp}/app2.log; then
|
||||
fail "release app2 should not inherit managed label due to except"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue