1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-10 21:33:27 +00:00

fstests: allow chunked upload tests to be skipped

This commit is contained in:
Nick Craig-Wood
2021-02-23 20:22:43 +00:00
parent 3258dad743
commit 71db19d8d8

View File

@@ -61,6 +61,8 @@ type ChunkedUploadConfig struct {
CeilChunkSize func(fs.SizeSuffix) fs.SizeSuffix CeilChunkSize func(fs.SizeSuffix) fs.SizeSuffix
// More than one chunk is required on upload // More than one chunk is required on upload
NeedMultipleChunks bool NeedMultipleChunks bool
// Skip this particular remote
Skip bool
} }
// SetUploadChunkSizer is a test only interface to change the upload chunk size at runtime // SetUploadChunkSizer is a test only interface to change the upload chunk size at runtime
@@ -1777,6 +1779,10 @@ func Run(t *testing.T, opt *Opt) {
t.Skip("not running with -short") t.Skip("not running with -short")
} }
if opt.ChunkedUpload.Skip {
t.Skip("skipping as ChunkedUpload.Skip is set")
}
setUploadChunkSizer, _ := f.(SetUploadChunkSizer) setUploadChunkSizer, _ := f.(SetUploadChunkSizer)
if setUploadChunkSizer == nil { if setUploadChunkSizer == nil {
t.Skipf("%T does not implement SetUploadChunkSizer", f) t.Skipf("%T does not implement SetUploadChunkSizer", f)