mirror of
https://github.com/rclone/rclone.git
synced 2024-11-27 02:45:16 +01:00
198c34ce21
Before this change rclone would use multipart uploads for any size of file. However multipart uploads are less efficient for smaller files and don't have MD5 checksums so it is advantageous to use single part uploads if possible. This implements single part uploads for all files smaller than the upload_cutoff size. Streamed files must be uploaded as multipart files though.
31 lines
671 B
Go
31 lines
671 B
Go
// Test S3 filesystem interface
|
|
package s3
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/ncw/rclone/fs"
|
|
"github.com/ncw/rclone/fstest/fstests"
|
|
)
|
|
|
|
// TestIntegration runs integration tests against the remote
|
|
func TestIntegration(t *testing.T) {
|
|
fstests.Run(t, &fstests.Opt{
|
|
RemoteName: "TestS3:",
|
|
NilObject: (*Object)(nil),
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
MinChunkSize: minChunkSize,
|
|
},
|
|
})
|
|
}
|
|
|
|
func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
return f.setUploadChunkSize(cs)
|
|
}
|
|
|
|
func (f *Fs) SetUploadCutoff(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
return f.setUploadCutoff(cs)
|
|
}
|
|
|
|
var _ fstests.SetUploadChunkSizer = (*Fs)(nil)
|