Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change step_create_cdrom_tests to pass on Windows #114

Merged
merged 1 commit into from Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions multistep/commonsteps/step_create_cdrom_test.go
Expand Up @@ -52,21 +52,21 @@ func checkFiles(t *testing.T, rootFolder string, expected map[string]string) {

if !d.IsDir() {
name, _ := filepath.Rel(rootFolder, path)

expectedContent, ok := expected[name]
nameSlashSafe := filepath.ToSlash(name)
expectedContent, ok := expected[nameSlashSafe]
if !ok {
t.Fatalf("unexpected file: %s", name)
t.Fatalf("unexpected file: %s", nameSlashSafe)
}

content, err := ioutil.ReadFile(path)
if err != nil {
t.Fatalf("reading file: %s", err)
}
if string(content) != expectedContent {
t.Fatalf("unexpected content: %s", name)
t.Fatalf("unexpected content: %s", nameSlashSafe)
}

delete(expected, name)
delete(expected, nameSlashSafe)
}

return nil
Expand Down