mirror of
https://github.com/rclone/rclone
synced 2024-12-01 10:31:57 +01:00
0f8d3fe6a3
Co-authored-by: Thibault Coupin <thibault.coupin@gmail.com> Co-authored-by: Nick Craig-Wood <nick@craig-wood.com>
65 lines
1.5 KiB
Go
65 lines
1.5 KiB
Go
// Test Webdav filesystem interface
|
|
package webdav
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/rclone/rclone/fs"
|
|
"github.com/rclone/rclone/fstest"
|
|
"github.com/rclone/rclone/fstest/fstests"
|
|
)
|
|
|
|
// TestIntegration runs integration tests against the remote
|
|
func TestIntegration(t *testing.T) {
|
|
fstests.Run(t, &fstests.Opt{
|
|
RemoteName: "TestWebdavNextcloud:",
|
|
NilObject: (*Object)(nil),
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
MinChunkSize: 1 * fs.Mebi,
|
|
},
|
|
})
|
|
}
|
|
|
|
// TestIntegration runs integration tests against the remote
|
|
func TestIntegration2(t *testing.T) {
|
|
if *fstest.RemoteName != "" {
|
|
t.Skip("skipping as -remote is set")
|
|
}
|
|
fstests.Run(t, &fstests.Opt{
|
|
RemoteName: "TestWebdavOwncloud:",
|
|
NilObject: (*Object)(nil),
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
Skip: true,
|
|
},
|
|
})
|
|
}
|
|
|
|
// TestIntegration runs integration tests against the remote
|
|
func TestIntegration3(t *testing.T) {
|
|
if *fstest.RemoteName != "" {
|
|
t.Skip("skipping as -remote is set")
|
|
}
|
|
fstests.Run(t, &fstests.Opt{
|
|
RemoteName: "TestWebdavRclone:",
|
|
NilObject: (*Object)(nil),
|
|
ChunkedUpload: fstests.ChunkedUploadConfig{
|
|
Skip: true,
|
|
},
|
|
})
|
|
}
|
|
|
|
// TestIntegration runs integration tests against the remote
|
|
func TestIntegration4(t *testing.T) {
|
|
if *fstest.RemoteName != "" {
|
|
t.Skip("skipping as -remote is set")
|
|
}
|
|
fstests.Run(t, &fstests.Opt{
|
|
RemoteName: "TestWebdavNTLM:",
|
|
NilObject: (*Object)(nil),
|
|
})
|
|
}
|
|
|
|
func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) {
|
|
return f.setUploadChunkSize(cs)
|
|
}
|