tests: pre make dir in case nothing happens
This commit is contained in:
parent
3052e3c5d5
commit
ba8484ee6b
|
@ -15,6 +15,9 @@ func mustString(s string, e error) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func createFiles(dir string, content map[string]string) {
|
func createFiles(dir string, content map[string]string) {
|
||||||
|
if err := os.MkdirAll(dir, 0777); err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
for relPath, content := range content {
|
for relPath, content := range content {
|
||||||
contentPath := filepath.Join(dir, relPath)
|
contentPath := filepath.Join(dir, relPath)
|
||||||
if err := os.MkdirAll(filepath.Dir(contentPath), 0777); err != nil {
|
if err := os.MkdirAll(filepath.Dir(contentPath), 0777); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue