This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: mkdirall must create the dirs for a path, not its parent
- Loading branch information
1 parent
a181898
commit 244540e
Showing
4 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package internal | ||
|
||
import ( | ||
"path" | ||
"testing" | ||
|
||
"github.com/Flaque/filet" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestMkdirAll(t *testing.T) { | ||
defer filet.CleanUp(t) | ||
|
||
tmpDir := filet.TmpDir(t, "") | ||
|
||
dir := path.Join(tmpDir, ".op", "compose", "services") | ||
|
||
err := MkdirAll(dir) | ||
assert.Nil(t, err) | ||
|
||
e, _ := Exists(dir) | ||
assert.True(t, e) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters