Modify: test for local handler delete
This commit is contained in:
parent
b4cfa6b601
commit
8b3fd8ec66
1 changed files with 3 additions and 3 deletions
|
@ -53,18 +53,18 @@ func TestHandler_Delete(t *testing.T) {
|
||||||
asserts.NoError(err)
|
asserts.NoError(err)
|
||||||
_ = file.Close()
|
_ = file.Close()
|
||||||
list, err := handler.Delete(ctx, []string{"test.file"})
|
list, err := handler.Delete(ctx, []string{"test.file"})
|
||||||
asserts.Equal([]string{"test.file"}, list)
|
asserts.Equal([]string{}, list)
|
||||||
asserts.NoError(err)
|
asserts.NoError(err)
|
||||||
|
|
||||||
file, err = os.Create("test.file")
|
file, err = os.Create("test.file")
|
||||||
asserts.NoError(err)
|
asserts.NoError(err)
|
||||||
_ = file.Close()
|
_ = file.Close()
|
||||||
list, err = handler.Delete(ctx, []string{"test.file", "test.notexist"})
|
list, err = handler.Delete(ctx, []string{"test.file", "test.notexist"})
|
||||||
asserts.Equal([]string{"test.file"}, list)
|
asserts.Equal([]string{"test.notexist"}, list)
|
||||||
asserts.Error(err)
|
asserts.Error(err)
|
||||||
|
|
||||||
list, err = handler.Delete(ctx, []string{"test.notexist"})
|
list, err = handler.Delete(ctx, []string{"test.notexist"})
|
||||||
asserts.Equal([]string{}, list)
|
asserts.Equal([]string{"test.notexist"}, list)
|
||||||
asserts.Error(err)
|
asserts.Error(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue