diff options
| author | Chris Lu <chris.lu@gmail.com> | 2018-05-12 22:42:28 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2018-05-12 22:42:28 -0700 |
| commit | fc7f81f6e7b596ad4f1246a727408f4cbdaa8f88 (patch) | |
| tree | c7d4e6dd9557b0f68b1263e0aadae32b939ae13a /weed/filer2/memdb/memdb_store_test.go | |
| parent | 9ecbf92569911abc6d95bc86e133326845b6b005 (diff) | |
| download | seaweedfs-fc7f81f6e7b596ad4f1246a727408f4cbdaa8f88.tar.xz seaweedfs-fc7f81f6e7b596ad4f1246a727408f4cbdaa8f88.zip | |
remove nlink property from directory node
Diffstat (limited to 'weed/filer2/memdb/memdb_store_test.go')
| -rw-r--r-- | weed/filer2/memdb/memdb_store_test.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/weed/filer2/memdb/memdb_store_test.go b/weed/filer2/memdb/memdb_store_test.go index b2587f3e2..9c7810d4d 100644 --- a/weed/filer2/memdb/memdb_store_test.go +++ b/weed/filer2/memdb/memdb_store_test.go @@ -101,8 +101,9 @@ func TestCreateFileAndList(t *testing.T) { return } + file3Path := filer2.FullPath("/home/chris/this/is/file3.jpg") entry3 := &filer2.Entry{ - FullPath: filer2.FullPath("/home/chris/this/is/file3.jpg"), + FullPath: file3Path, Attr: filer2.Attr{ Mode: 0440, Uid: 1234, @@ -118,4 +119,12 @@ func TestCreateFileAndList(t *testing.T) { return } + // delete file and count + filer.DeleteEntry(file3Path) + entries, _ = filer.ListDirectoryEntries(filer2.FullPath("/home/chris/this/is")) + if len(entries) != 1 { + t.Errorf("list entries count: %v", len(entries)) + return + } + } |
