mirror of
https://github.com/rclone/rclone.git
synced 2025-12-16 00:04:40 +00:00
fstest: implement method to skip ChunkedCopy tests
This commit is contained in:
@@ -83,6 +83,7 @@ type SetUploadCutoffer interface {
|
||||
type SetCopyCutoffer interface {
|
||||
// Change the configured CopyCutoff.
|
||||
// Will only be called while no transfer is in progress.
|
||||
// Return fs.ErrorNotImplemented if you can't implement this
|
||||
SetCopyCutoff(fs.SizeSuffix) (fs.SizeSuffix, error)
|
||||
}
|
||||
|
||||
@@ -2345,10 +2346,6 @@ func Run(t *testing.T, opt *Opt) {
|
||||
t.Skip("skipping as ChunkedUpload.Skip is set")
|
||||
}
|
||||
|
||||
if strings.HasPrefix(f.Name(), "serves3") || strings.HasPrefix(f.Name(), "TestS3Rclone") {
|
||||
t.Skip("FIXME skip test - see #7454")
|
||||
}
|
||||
|
||||
do, _ := f.(SetCopyCutoffer)
|
||||
if do == nil {
|
||||
t.Skipf("%T does not implement SetCopyCutoff", f)
|
||||
@@ -2362,6 +2359,13 @@ func Run(t *testing.T, opt *Opt) {
|
||||
minChunkSize = opt.ChunkedUpload.CeilChunkSize(minChunkSize)
|
||||
}
|
||||
|
||||
// Test setting the copy cutoff before we get going
|
||||
_, err := do.SetCopyCutoff(minChunkSize)
|
||||
if errors.Is(err, fs.ErrorNotImplemented) {
|
||||
t.Skipf("%T does not support SetCopyCutoff: %v", f, err)
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
chunkSizes := fs.SizeSuffixList{
|
||||
minChunkSize,
|
||||
minChunkSize + 1,
|
||||
|
||||
Reference in New Issue
Block a user