2017-02-01 04:34:11 +08:00
|
|
|
// Test Sftp filesystem interface
|
2018-03-20 00:37:40 +08:00
|
|
|
|
2021-09-09 20:25:25 +08:00
|
|
|
//go:build !plan9
|
2018-03-20 00:37:40 +08:00
|
|
|
|
2017-02-01 04:34:11 +08:00
|
|
|
package sftp_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
2019-07-29 01:47:38 +08:00
|
|
|
"github.com/rclone/rclone/backend/sftp"
|
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"
|
2017-02-01 04:34:11 +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: "TestSFTPOpenssh:",
|
|
|
|
NilObject: (*sftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestIntegration2(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestSFTPRclone:",
|
2018-04-08 01:48:11 +08:00
|
|
|
NilObject: (*sftp.Object)(nil),
|
|
|
|
})
|
2017-02-01 04:34:11 +08:00
|
|
|
}
|
2023-06-09 18:02:40 +08:00
|
|
|
|
|
|
|
func TestIntegration3(t *testing.T) {
|
|
|
|
if *fstest.RemoteName != "" {
|
|
|
|
t.Skip("skipping as -remote is set")
|
|
|
|
}
|
|
|
|
fstests.Run(t, &fstests.Opt{
|
|
|
|
RemoteName: "TestSFTPRcloneSSH:",
|
|
|
|
NilObject: (*sftp.Object)(nil),
|
|
|
|
})
|
|
|
|
}
|