test: address review feedback on defaultInherit tests

Agent-Logs-Url: https://github.com/helmfile/helmfile/sessions/3ea9b8e4-633f-43c4-899f-e063ec576486

Co-authored-by: yxxhero <11087727+yxxhero@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-20 04:16:44 +00:00 committed by GitHub
parent e1ed607c65
commit 01cfc7aa72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -646,11 +646,11 @@ func TestTemplate_DefaultInherit_Multiple(t *testing.T) {
templates:
ns:
namespace: from-ns-template
ctx:
override:
namespace: from-ctx-template
defaultInherit:
- ns
- ctx
- override
releases:
- name: app1
chart: incubator/raw
@ -688,7 +688,7 @@ releases:
})
}
t.Run("multiple default inherits are applied", func(t *testing.T) {
t.Run("multiple default inherits are applied in order", func(t *testing.T) {
check(t, testcase{
templated: []exectest.Release{
{Name: "app1", Flags: []string{"--kube-context", "default", "--namespace", "from-ctx-template"}},

View File

@ -476,10 +476,10 @@ func TestDefaultInherits_UnmarshalYAML(t *testing.T) {
},
}
for _, yamlV3 := range []bool{true, false} {
t.Run(fmt.Sprintf("GoYamlV3=%t", yamlV3), func(t *testing.T) {
for _, enableGoYamlV3 := range []bool{true, false} {
t.Run(fmt.Sprintf("GoYamlV3=%t", enableGoYamlV3), func(t *testing.T) {
prev := runtime.GoYamlV3
runtime.GoYamlV3 = yamlV3
runtime.GoYamlV3 = enableGoYamlV3
defer func() {
runtime.GoYamlV3 = prev
}()