2016-12-27 21:52:30 +01:00
|
|
|
// Test FTP filesystem interface
|
|
|
|
package ftp_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-07-28 19:47:38 +02:00
|
|
|
"github.com/rclone/rclone/backend/ftp"
|
2019-10-04 17:51:07 +02:00
|
|
|
"github.com/rclone/rclone/fstest"
|
2019-07-28 19:47:38 +02:00
|
|
|
"github.com/rclone/rclone/fstest/fstests"
|
2016-12-27 21:52:30 +01:00
|
|
|
)
|
|
|
|
|
2021-07-23 01:02:19 +02:00
|
|
|
// TestIntegration runs integration tests against rclone FTP server
|
2018-04-07 19:48:11 +02:00
|
|
|
func TestIntegration(t *testing.T) {
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
2021-07-23 01:02:19 +02:00
|
|
|
RemoteName: "TestFTPRclone:",
|
2018-04-07 19:48:11 +02:00
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
2016-12-27 21:52:30 +01:00
|
|
|
}
|
2019-10-04 17:51:07 +02:00
|
|
|
|
2021-07-23 01:02:19 +02:00
|
|
|
// TestIntegrationProftpd runs integration tests against proFTPd
|
|
|
|
func TestIntegrationProftpd(t *testing.T) {
|
2019-10-04 17:51:07 +02:00
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
2021-07-23 01:02:19 +02:00
|
|
|
RemoteName: "TestFTPProftpd:",
|
2019-10-04 17:51:07 +02:00
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2021-07-23 01:02:19 +02:00
|
|
|
// TestIntegrationPureftpd runs integration tests against pureFTPd
|
|
|
|
func TestIntegrationPureftpd(t *testing.T) {
|
2019-10-04 17:51:07 +02:00
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestFTPPureftpd:",
|
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2021-07-23 01:02:19 +02:00
|
|
|
// TestIntegrationVsftpd runs integration tests against vsFTPd
|
|
|
|
func TestIntegrationVsftpd(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestFTPVsftpd:",
|
|
|
|
NilObject: (*ftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|