aboutsummaryrefslogtreecommitdiff
path: root/repo_test.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-09-13 12:58:51 +0200
committerNicolas Peugnet <n.peugnet@free.fr>2021-09-13 13:27:57 +0200
commit0eb5ef4003d9cd4ba9995e67bf4a2ff04d367de9 (patch)
treed6523b7d4076da10f98ee8b30bac2cc2cb9cb16f /repo_test.go
parent90979b9fdf370044c2b0de6c7f3b9fff4222e907 (diff)
downloaddna-backup-0eb5ef4003d9cd4ba9995e67bf4a2ff04d367de9.tar.gz
dna-backup-0eb5ef4003d9cd4ba9995e67bf4a2ff04d367de9.zip
fix windows test by converting testdata files path
Diffstat (limited to 'repo_test.go')
-rw-r--r--repo_test.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/repo_test.go b/repo_test.go
index 174c398..39556c6 100644
--- a/repo_test.go
+++ b/repo_test.go
@@ -320,9 +320,10 @@ func assertCompatibleRepoFile(t *testing.T, expected string, actual string, pref
eFiles := loadFileList(expected)
aFiles := loadFileList(actual)
assertLen(t, len(eFiles), aFiles, prefix)
- for i := 0; i < len(eFiles); i++ {
- if eFiles[i] != aFiles[i] {
- t.Fatal(prefix, "file entry do not match:", aFiles[i], ", expected:", eFiles[i])
+ for i, eFile := range eFiles {
+ eFile.Path = filepath.FromSlash(eFile.Path)
+ if eFile != aFiles[i] {
+ t.Fatal(prefix, "file entry do not match:", aFiles[i], ", expected:", eFile)
}
}
} else if filepath.Base(expected) == recipeName {