github.com/artpar/rclone@v1.67.3/backend/webdav/webdav_test.go (about) 1 // Test Webdav filesystem interface 2 package webdav 3 4 import ( 5 "testing" 6 7 "github.com/artpar/rclone/fs" 8 "github.com/artpar/rclone/fstest" 9 "github.com/artpar/rclone/fstest/fstests" 10 ) 11 12 // TestIntegration runs integration tests against the remote 13 func TestIntegration(t *testing.T) { 14 fstests.Run(t, &fstests.Opt{ 15 RemoteName: "TestWebdavNextcloud:", 16 NilObject: (*Object)(nil), 17 ChunkedUpload: fstests.ChunkedUploadConfig{ 18 MinChunkSize: 1 * fs.Mebi, 19 }, 20 }) 21 } 22 23 // TestIntegration runs integration tests against the remote 24 func TestIntegration2(t *testing.T) { 25 if *fstest.RemoteName != "" { 26 t.Skip("skipping as -remote is set") 27 } 28 fstests.Run(t, &fstests.Opt{ 29 RemoteName: "TestWebdavOwncloud:", 30 NilObject: (*Object)(nil), 31 ChunkedUpload: fstests.ChunkedUploadConfig{ 32 Skip: true, 33 }, 34 }) 35 } 36 37 // TestIntegration runs integration tests against the remote 38 func TestIntegration3(t *testing.T) { 39 if *fstest.RemoteName != "" { 40 t.Skip("skipping as -remote is set") 41 } 42 fstests.Run(t, &fstests.Opt{ 43 RemoteName: "TestWebdavRclone:", 44 NilObject: (*Object)(nil), 45 ChunkedUpload: fstests.ChunkedUploadConfig{ 46 Skip: true, 47 }, 48 }) 49 } 50 51 // TestIntegration runs integration tests against the remote 52 func TestIntegration4(t *testing.T) { 53 if *fstest.RemoteName != "" { 54 t.Skip("skipping as -remote is set") 55 } 56 fstests.Run(t, &fstests.Opt{ 57 RemoteName: "TestWebdavNTLM:", 58 NilObject: (*Object)(nil), 59 }) 60 } 61 62 func (f *Fs) SetUploadChunkSize(cs fs.SizeSuffix) (fs.SizeSuffix, error) { 63 return f.setUploadChunkSize(cs) 64 }