test: fix running tests locally (#1088)
This commit is contained in:
		
							parent
							
								
									e1d42e5aab
								
							
						
					
					
						commit
						9596790a51
					
				|  | @ -295,8 +295,9 @@ func testHelmfileTemplateWithBuildCommand(t *testing.T, goccyGoYaml bool) { | ||||||
| 
 | 
 | ||||||
| 			if stat, _ := os.Stat(outputFile); stat != nil { | 			if stat, _ := os.Stat(outputFile); stat != nil { | ||||||
| 				want, err := os.ReadFile(outputFile) | 				want, err := os.ReadFile(outputFile) | ||||||
|  | 				wantStr := strings.ReplaceAll(string(want), "__workingdir__", wd) | ||||||
| 				require.NoError(t, err) | 				require.NoError(t, err) | ||||||
| 				require.Equal(t, string(want), gotStr) | 				require.Equal(t, wantStr, gotStr) | ||||||
| 			} else { | 			} else { | ||||||
| 				// To update the test golden image(output.yaml), just remove it and rerun this test.
 | 				// 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
 | 				// We automatically capture the output to `output.yaml` in the test case directory
 | ||||||
|  |  | ||||||
|  | @ -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 | filepath: input.yaml | ||||||
| helmBinary: helm | helmBinary: helm | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue