阿里云oss
This commit is contained in:
19
common_fun/file_func_test.go
Normal file
19
common_fun/file_func_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package cf
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestEnsureDirExists(t *testing.T) {
|
||||
url := "/test"
|
||||
err := EnsureDirExists(url)
|
||||
if err != nil {
|
||||
t.Errorf("EnsureDirExists() error = %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestEnsureParentDirExists(t *testing.T) {
|
||||
filePath := "/test/test1/test.txt"
|
||||
err := EnsureParentDirExists(filePath)
|
||||
if err != nil {
|
||||
t.Errorf("EnsureDirExists() error = %v", err)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user