mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-09 08:06:10 +02:00
fix(state): enhance error message for missing .gotmpl extension in helmfile v1 (#1989)
* fix(state): enhance error message for missing .gotmpl extension in helmfile Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
@@ -414,7 +414,7 @@ releases:
|
||||
t.Run("fail due to unknown field with goccy/go-yaml", func(t *testing.T) {
|
||||
check(t, testcase{
|
||||
goccyGoYaml: true,
|
||||
error: `in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: [4:3] unknown field "foobar"
|
||||
error: `in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1. Started seeing this since Helmfile v1? Add the .gotmpl file extension: [4:3] unknown field "foobar"
|
||||
2 | releases:
|
||||
3 | - name: app1
|
||||
> 4 | foobar: FOOBAR
|
||||
@@ -426,7 +426,7 @@ releases:
|
||||
t.Run("fail due to unknown field with gopkg.in/yaml.v2", func(t *testing.T) {
|
||||
check(t, testcase{
|
||||
goccyGoYaml: false,
|
||||
error: `in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: unmarshal errors:
|
||||
error: `in ./helmfile.yaml: failed to read helmfile.yaml: reading document at index 1. Started seeing this since Helmfile v1? Add the .gotmpl file extension: yaml: unmarshal errors:
|
||||
line 4: field foobar not found in type state.ReleaseSpec`,
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user