mirror of
https://github.com/rclone/rclone.git
synced 2025-12-15 15:53:41 +00:00
test: replace defer cleanup with t.Cleanup
Reference: https://pkg.go.dev/testing#T.Cleanup Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
This commit is contained in:
committed by
Nick Craig-Wood
parent
be783a1856
commit
8e507075d1
@@ -37,7 +37,6 @@ func compareListJSONItem(t *testing.T, a, b *operations.ListJSONItem, precision
|
||||
func TestListJSON(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
r := fstest.NewRun(t)
|
||||
defer r.Finalise()
|
||||
file1 := r.WriteBoth(ctx, "file1", "file1", t1)
|
||||
file2 := r.WriteBoth(ctx, "sub/file2", "sub/file2", t2)
|
||||
|
||||
@@ -245,7 +244,6 @@ func TestListJSON(t *testing.T) {
|
||||
func TestStatJSON(t *testing.T) {
|
||||
ctx := context.Background()
|
||||
r := fstest.NewRun(t)
|
||||
defer r.Finalise()
|
||||
file1 := r.WriteBoth(ctx, "file1", "file1", t1)
|
||||
file2 := r.WriteBoth(ctx, "sub/file2", "sub/file2", t2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user