2016-12-28 04:52:30 +08:00
|
|
|
// Test FTP filesystem interface
|
|
|
|
package ftp_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-07-29 01:47:38 +08:00
|
|
|
"github.com/rclone/rclone/backend/ftp"
|
2019-10-04 23:51:07 +08:00
|
|
|
"github.com/rclone/rclone/fstest"
|
2019-07-29 01:47:38 +08:00
|
|
|
"github.com/rclone/rclone/fstest/fstests"
|
2016-12-28 04:52:30 +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{
|
2019-10-04 23:51:07 +08:00
|
|
|
RemoteName: "TestFTPProftpd:",
|
2018-04-08 01:48:11 +08:00
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
2016-12-28 04:52:30 +08:00
|
|
|
}
|
2019-10-04 23:51:07 +08:00
|
|
|
|
|
|
|
func TestIntegration2(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestFTPRclone:",
|
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestIntegration3(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestFTPPureftpd:",
|
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
// func TestIntegration4(t *testing.T) {
|
|
|
|
// if *fstest.RemoteName != "" {
|
|
|
|
// t.Skip("skipping as -remote is set")
|
|
|
|
// }
|
|
|
|
// fstests.Run(t, &fstests.Opt{
|
|
|
|
// RemoteName: "TestFTPVsftpd:",
|
|
|
|
// NilObject: (*ftp.Object)(nil),
|
|
|
|
// })
|
|
|
|
// }
|