mirror of
https://github.com/rclone/rclone.git
synced 2025-07-18 21:14:41 +02:00
This commit introduces a significant rewrite of PikPak's upload, specifically targeting direct handling of file uploads rather than relying on the generic S3 manager. The primary motivation is to address critical upload failures reported in #8629. * Added new `multipart.go` file for multipart uploads using AWS S3 SDK. * Removed dependency on AWS S3 manager; replaced with custom handling. * Updated PikPak test package with new multipart upload tests, including configurable chunk size and upload cutoff. * Added new configuration option `upload_cutoff` to control chunked uploads. * Defined constraints for `chunk_size` and `upload_cutoff` (min/max values, validation). * Adjusted default `upload_concurrency` from 5 to 4.
35 lines
769 B
Go
35 lines
769 B
Go
// Test PikPak filesystem interface
|
|
package pikpak
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/rclone/rclone/fs"
|
|
"github.com/rclone/rclone/fstest/fstests"
|
|
)
|
|
|
|
// TestIntegration runs integration tests against the remote
|
|
func TestIntegration(t *testing.T) {
|
|
fstests.Run(t, &fstests.Opt{
|
|
RemoteName: "TestPikPak:",
|
|
NilObject: (*Object)(nil),
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
MinChunkSize: minChunkSize,
|
|
MaxChunkSize: maxChunkSize,
|
|
},
|
|
})
|
|
}
|
|
|
|
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)
|
|
_ fstests.SetUploadCutoffer = (*Fs)(nil)
|
|
)
|