fix tests

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero 2025-02-03 19:40:08 +08:00 committed by yxxhero
parent 44d79a9f14
commit a9fce77d4a
3 changed files with 9 additions and 4 deletions

View File

@ -1442,7 +1442,7 @@ func TestLoadDesiredStateFromYaml_DuplicateReleaseName(t *testing.T) {
}
func TestLoadDesiredStateFromYaml_Bases(t *testing.T) {
yamlFile := "/path/to/yaml/file"
yamlFile := "/path/to/yaml/file.gotmpl"
yamlContent := `bases:
- ../base.yaml
- ../base.gotmpl
@ -1513,7 +1513,7 @@ helmDefaults:
}
func TestLoadDesiredStateFromYaml_MultiPartTemplate(t *testing.T) {
yamlFile := "/path/to/yaml/file"
yamlFile := "/path/to/yaml/file.gotmpl"
yamlContent := `bases:
- ../base.yaml
---

View File

@ -138,26 +138,31 @@ func TestTopConfigKeysVerifier(t *testing.T) {
name: "error when not correct order 00",
helmfileContent: []byte("releases:\nbases:\n"),
wantErr: true,
wantStrict: true,
},
{
name: "error when not correct order 01",
helmfileContent: []byte("releases:\nhelmDefaults:\nbases:\n"),
wantErr: true,
wantStrict: true,
},
{
name: "error when not correct order 02",
helmfileContent: []byte("helmDefaults:\nreleases:\nbases:\n"),
wantErr: true,
wantStrict: true,
},
{
name: "error when not correct order 03",
helmfileContent: []byte("releases:\nva:\nve:\nbases:\n"),
wantErr: true,
wantStrict: true,
},
{
name: "error when not correct order 04",
helmfileContent: []byte("bases:\nreleases:\nenvironments:\n"),
wantErr: true,
wantStrict: true,
},
{
name: "no error when only has bases",

View File

@ -1,7 +1,7 @@
---
# Source: __workingdir__/testdata/snapshot/issue_2098_release_template_needs/input.yaml
# Source: __workingdir__/testdata/snapshot/issue_2098_release_template_needs/input.yaml.gotmpl
filepath: input.yaml
filepath: input.yaml.gotmpl
helmBinary: helm
kustomizeBinary: kustomize
environments: