diff options
Diffstat (limited to 'weed/filer2/filer_test.go')
| -rw-r--r-- | weed/filer2/filer_test.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/weed/filer2/filer_test.go b/weed/filer2/filer_test.go index 0cefb679a..bafc25cf0 100644 --- a/weed/filer2/filer_test.go +++ b/weed/filer2/filer_test.go @@ -7,21 +7,19 @@ import ( ) func TestRecursion(t *testing.T) { - filer := NewFiler("") - fullPath := "/home/chris/some/file/abc.jpg" expected := []string{ - "/home/chris/some", "file", - "/home/chris", "some", - "/home", "chris", "/", "home", + "/home", "chris", + "/home/chris", "some", + "/home/chris/some", "file", } dir, _ := filepath.Split(fullPath) i := 0 - filer.recursivelyEnsureDirectory(dir, func(parent, name string) error { + recursivelyEnsureDirectory(dir, func(parent, name string) error { if parent != expected[i] || name != expected[i+1] { t.Errorf("recursive directory is wrong! parent=%s dirName=%s", parent, name) } |
