2015-10-05 05:08:31 +08:00
|
|
|
// Test OneDrive filesystem interface
|
2018-09-07 19:02:27 +08:00
|
|
|
package onedrive
|
2015-10-05 05:08:31 +08:00
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-07-29 01:47:38 +08:00
|
|
|
"github.com/rclone/rclone/fs"
|
2021-01-30 04:04:21 +08:00
|
|
|
"github.com/rclone/rclone/fstest"
|
2019-07-29 01:47:38 +08:00
|
|
|
"github.com/rclone/rclone/fstest/fstests"
|
2015-10-05 05:08:31 +08:00
|
|
|
)
|
|
|
|
|
2018-04-08 01:48:11 +08:00
|
|
|
// TestIntegration runs integration tests against the remote
|
|
|
|
func TestIntegration(t *testing.T) {
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestOneDrive:",
|
2018-09-07 19:02:27 +08:00
|
|
|
NilObject: (*Object)(nil),
|
|
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
|
|
CeilChunkSize: fstests.NextMultipleOf(chunkSizeMultiple),
|
|
|
|
},
|
2018-04-08 01:48:11 +08:00
|
|
|
})
|
2015-10-05 05:08:31 +08:00
|
|
|
}
|
2018-09-07 19:02:27 +08:00
|
|
|
|
2021-01-30 04:04:21 +08:00
|
|
|
// TestIntegrationCn runs integration tests against the remote
|
|
|
|
func TestIntegrationCn(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestOneDriveCn:",
|
|
|
|
NilObject: (*Object)(nil),
|
|
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
|
|
CeilChunkSize: fstests.NextMultipleOf(chunkSizeMultiple),
|
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2018-09-07 19:02:27 +08:00
|
|
|
func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
|
|
return f.setUploadChunkSize(cs)
|
|
|
|
}
|
|
|
|
|
|
|
|
var _ fstests.SetUploadChunkSizer = (*Fs)(nil)
|