2015-11-27 18:25:52 +00:00
|
|
|
// Test B2 filesystem interface
|
2018-09-07 11:02:27 +00:00
|
|
|
package b2
|
2015-11-27 18:25:52 +00:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-07-28 17:47:38 +00:00
|
|
|
"github.com/rclone/rclone/fs"
|
|
|
|
"github.com/rclone/rclone/fstest/fstests"
|
2015-11-27 18:25:52 +00:00
|
|
|
)
|
|
|
|
|
2018-04-07 17:48:11 +00:00
|
|
|
// TestIntegration runs integration tests against the remote
|
|
|
|
func TestIntegration(t *testing.T) {
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestB2:",
|
2018-09-07 11:02:27 +00:00
|
|
|
NilObject: (*Object)(nil),
|
|
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
2018-10-13 21:45:17 +00:00
|
|
|
MinChunkSize: minChunkSize,
|
|
|
|
NeedMultipleChunks: true,
|
2018-09-07 11:02:27 +00:00
|
|
|
},
|
2018-04-07 17:48:11 +00:00
|
|
|
})
|
2015-11-27 18:25:52 +00:00
|
|
|
}
|
2018-09-07 11:02:27 +00:00
|
|
|
|
|
|
|
func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
|
|
return f.setUploadChunkSize(cs)
|
|
|
|
}
|
|
|
|
|
2018-10-13 21:45:17 +00:00
|
|
|
func (f *Fs) SetUploadCutoff(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
|
|
return f.setUploadCutoff(cs)
|
|
|
|
}
|
|
|
|
|
2023-11-24 12:36:48 +00:00
|
|
|
func (f *Fs) SetCopyCutoff(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
|
|
return f.setCopyCutoff(cs)
|
|
|
|
}
|
|
|
|
|
2018-10-13 21:45:17 +00:00
|
|
|
var (
|
|
|
|
_ fstests.SetUploadChunkSizer = (*Fs)(nil)
|
|
|
|
_ fstests.SetUploadCutoffer = (*Fs)(nil)
|
2023-11-24 12:36:48 +00:00
|
|
|
_ fstests.SetCopyCutoffer = (*Fs)(nil)
|
2018-10-13 21:45:17 +00:00
|
|
|
)
|