1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +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
// More than one chunk is required on upload
NeedMultipleChunks bool
// Skip this particular remote
Skip bool
}
// 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")
}
if opt.ChunkedUpload.Skip {
t.Skip("skipping as ChunkedUpload.Skip is set")
}
setUploadChunkSizer, _ := f.(SetUploadChunkSizer)
if setUploadChunkSizer == nil {
t.Skipf("%T does not implement SetUploadChunkSizer", f)