mirror of
https://github.com/rclone/rclone.git
synced 2026-01-07 11:03:15 +00:00
Add context propagation to rclone
- Change rclone/fs interfaces to accept context.Context - Update interface implementations to use context.Context - Change top level usage to propagate context to lover level functions Context propagation is needed for stopping transfers and passing other request-scoped values.
This commit is contained in:
committed by
Nick Craig-Wood
parent
a2c317b46e
commit
f78cd1e043
@@ -1,6 +1,7 @@
|
||||
package mounttest
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -172,7 +173,7 @@ func TestDirCacheFlush(t *testing.T) {
|
||||
run.readLocal(t, localDm, "")
|
||||
assert.Equal(t, dm, localDm, "expected vs fuse mount")
|
||||
|
||||
err := run.fremote.Mkdir("dir/subdir")
|
||||
err := run.fremote.Mkdir(context.Background(), "dir/subdir")
|
||||
require.NoError(t, err)
|
||||
|
||||
root, err := run.vfs.Root()
|
||||
@@ -208,7 +209,7 @@ func TestDirCacheFlushOnDirRename(t *testing.T) {
|
||||
assert.Equal(t, dm, localDm, "expected vs fuse mount")
|
||||
|
||||
// expect remotely created directory to not show up
|
||||
err := run.fremote.Mkdir("dir/subdir")
|
||||
err := run.fremote.Mkdir(context.Background(), "dir/subdir")
|
||||
require.NoError(t, err)
|
||||
run.readLocal(t, localDm, "")
|
||||
assert.Equal(t, dm, localDm, "expected vs fuse mount")
|
||||
|
||||
Reference in New Issue
Block a user