test: fix running tests locally (#1088)

This commit is contained in:
Felipe Santos 2023-10-22 18:51:40 -03:00 committed by GitHub
parent e1d42e5aab
commit 9596790a51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -295,8 +295,9 @@ func testHelmfileTemplateWithBuildCommand(t *testing.T, goccyGoYaml bool) {
if stat, _ := os.Stat(outputFile); stat != nil {
want, err := os.ReadFile(outputFile)
wantStr := strings.ReplaceAll(string(want), "__workingdir__", wd)
require.NoError(t, err)
require.Equal(t, string(want), gotStr)
require.Equal(t, wantStr, gotStr)
} else {
// To update the test golden image(output.yaml), just remove it and rerun this test.
// We automatically capture the output to `output.yaml` in the test case directory

View File

@ -1,5 +1,5 @@
---
# Source: /home/runner/work/helmfile/helmfile/test/e2e/template/helmfile/testdata/snapshot/issue_2098_release_template_needs/input.yaml
# Source: __workingdir__/testdata/snapshot/issue_2098_release_template_needs/input.yaml
filepath: input.yaml
helmBinary: helm