mirror of
https://github.com/rclone/rclone.git
synced 2025-08-14 07:49:00 +02:00
fs/cache: factor Fs caching from fs/rc into its own package
This commit is contained in:
@ -3,6 +3,7 @@ package sync
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ncw/rclone/fs/cache"
|
||||
"github.com/ncw/rclone/fs/rc"
|
||||
"github.com/ncw/rclone/fstest"
|
||||
"github.com/stretchr/testify/assert"
|
||||
@ -16,8 +17,8 @@ func rcNewRun(t *testing.T, method string) (*fstest.Run, *rc.Call) {
|
||||
r := fstest.NewRun(t)
|
||||
call := rc.Calls.Get(method)
|
||||
assert.NotNil(t, call)
|
||||
rc.PutCachedFs(r.LocalName, r.Flocal)
|
||||
rc.PutCachedFs(r.FremoteName, r.Fremote)
|
||||
cache.Put(r.LocalName, r.Flocal)
|
||||
cache.Put(r.FremoteName, r.Fremote)
|
||||
return r, call
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user