tests: pre make dir in case nothing happens

This commit is contained in:
Adrien Delorme 2021-02-11 14:49:52 +01:00
parent 3052e3c5d5
commit ba8484ee6b
1 changed files with 3 additions and 0 deletions

View File

@ -15,6 +15,9 @@ func mustString(s string, e error) string {
}
func createFiles(dir string, content map[string]string) {
if err := os.MkdirAll(dir, 0777); err != nil {
panic(err)
}
for relPath, content := range content {
contentPath := filepath.Join(dir, relPath)
if err := os.MkdirAll(filepath.Dir(contentPath), 0777); err != nil {