From 6e28edeb9aa1c18e27faf641729b2cbc259fe13a Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 29 Feb 2024 17:55:36 +0000 Subject: [PATCH] cache: fix crash in tests which assumed local could Purge --- backend/cache/cache_internal_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/cache/cache_internal_test.go b/backend/cache/cache_internal_test.go index d7ee0fba2..5c7d19c6d 100644 --- a/backend/cache/cache_internal_test.go +++ b/backend/cache/cache_internal_test.go @@ -30,6 +30,7 @@ import ( "github.com/rclone/rclone/fs/config" "github.com/rclone/rclone/fs/config/configmap" "github.com/rclone/rclone/fs/object" + "github.com/rclone/rclone/fs/operations" "github.com/rclone/rclone/fstest" "github.com/rclone/rclone/fstest/testy" "github.com/rclone/rclone/lib/random" @@ -935,8 +936,7 @@ func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool } if purge { - _ = f.Features().Purge(context.Background(), "") - require.NoError(t, err) + _ = operations.Purge(context.Background(), f, "") } err = f.Mkdir(context.Background(), "") require.NoError(t, err) @@ -949,7 +949,7 @@ func (r *run) newCacheFs(t *testing.T, remote, id string, needRemote, purge bool } func (r *run) cleanupFs(t *testing.T, f fs.Fs) { - err := f.Features().Purge(context.Background(), "") + err := operations.Purge(context.Background(), f, "") require.NoError(t, err) cfs, err := r.getCacheFs(f) require.NoError(t, err)