Fix filepath handling on Windows (#1754)

This commit is contained in:
Quan TRAN
2021-05-02 09:22:25 +09:00
committed by GitHub
parent 08db073958
commit ded0f1049a
2 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -1522,7 +1522,7 @@ func TestLoadDesiredStateFromYaml_DuplicateReleaseName(t *testing.T) {
stage: post
`)
readFile := func(filename string) ([]byte, error) {
if filename != yamlFile {
if filepath.ToSlash(filename) != yamlFile {
return nil, fmt.Errorf("unexpected filename: %s", filename)
}
return yamlContent, nil