fstests: add option to skip chunked upload

This commit is contained in:
Thibault Coupin 2022-05-20 11:05:52 +02:00 committed by Nick Craig-Wood
parent 4af0c1d902
commit 3165093feb

View File

@ -60,6 +60,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
@ -1885,6 +1887,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)