"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
filelu: run the chunked upload integration tests
Nick Craig-Wood76b5ee825950
diff --git a/backend/filelu/filelu_internal_test.go b/backend/filelu/filelu_internal_test.gonew file mode 100644index 000000000..3ebd0899a--- /dev/null+++ b/backend/filelu/filelu_internal_test.go@@ -0,0 +1,29 @@+package filelu++import (+ "github.com/rclone/rclone/fs"+ "github.com/rclone/rclone/fstest/fstests"+)++// SetUploadChunkSize changes the configured chunk size, returning the old value.+//+// It is only called by the integration tests while no transfer is in progress.+func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {+ var old fs.SizeSuffix+ old, f.opt.ChunkSize = f.opt.ChunkSize, cs+ return old, nil+}++// SetUploadCutoff changes the configured upload cutoff, returning the old value.+//+// It is only called by the integration tests while no transfer is in progress.+func (f *Fs) SetUploadCutoff(cutoff fs.SizeSuffix) (fs.SizeSuffix, error) {+ var old fs.SizeSuffix+ old, f.opt.UploadCutoff = f.opt.UploadCutoff, cutoff+ return old, nil+}++var (+ _ fstests.SetUploadChunkSizer = (*Fs)(nil)+ _ fstests.SetUploadCutoffer = (*Fs)(nil)+)diff --git a/backend/filelu/filelu_test.go b/backend/filelu/filelu_test.goindex 93b364a88..de0302957 100644--- a/backend/filelu/filelu_test.go+++ b/backend/filelu/filelu_test.go@@ -12,5 +12,8 @@ func TestIntegration(t *testing.T) {RemoteName: "TestFileLu:",NilObject: nil,SkipInvalidUTF8: true,+ ChunkedUpload: fstests.ChunkedUploadConfig{+ MinChunkSize: 1,+ },})}