Skip to content

Commit

Permalink
chore: fix file path
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Nov 17, 2024
1 parent 5fe44be commit ee7e88e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/health/health_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,14 @@ func getHealthStatus(yamlPath string, t *testing.T, overwrites map[string]string
if !strings.HasPrefix(yamlPath, "./testdata/") && !strings.HasPrefix(yamlPath, "../resource_customizations") {
yamlPath = "./testdata/" + yamlPath
}
yamlBytes, err := os.ReadFile(yamlPath)
var yamlBytes []byte
var err error

if strings.Contains(yamlPath, "::") {
yamlBytes, err = os.ReadFile(strings.ReplaceAll(yamlPath, "::", "/"))
} else {
yamlBytes, err = os.ReadFile(yamlPath)
}
require.NoError(t, err)

yamlString := string(yamlBytes)
Expand Down

0 comments on commit ee7e88e

Please sign in to comment.