/
githubmirror
/
rclone
Обзор
Документация
Войти
/
githubmirror
/
rclone
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
backend/hidrive/hidrive_test.go
45 строк
1 KB
Ovidiu Victor Tatar
new backend: hidrive - fixes #1069
08 июл 2022, 20:24
08 июл 2022, 20:24
b4d847c
Код
Авторство
О чём код?
// Test HiDrive filesystem interface package hidrive 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) { name := "TestHiDrive" fstests.Run(t, &fstests.Opt{ RemoteName: name + ":", NilObject: (*Object)(nil), ChunkedUpload: fstests.ChunkedUploadConfig{ MinChunkSize: 1, MaxChunkSize: MaximumUploadBytes, CeilChunkSize: nil, NeedMultipleChunks: false, }, }) } // Change the configured UploadChunkSize. // Will only be called while no transfer is in progress. func (f *Fs) SetUploadChunkSize(chunksize fs.SizeSuffix) (fs.SizeSuffix, error) { var old fs.SizeSuffix old, f.opt.UploadChunkSize = f.opt.UploadChunkSize, chunksize return old, nil } // Change the configured UploadCutoff. // Will only be called while no transfer is in progress. func (f *Fs) SetUploadCutoff(cutoff fs.SizeSuffix) (fs.SizeSuffix, error) { var old fs.SizeSuffix old, f.opt.UploadCutoff = f.opt.UploadCutoff, cutoff return old, nil } var ( _ fstests.SetUploadChunkSizer = (*Fs)(nil) _ fstests.SetUploadCutoffer = (*Fs)(nil) )