mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 23:49:15 +01:00
10449c86a4
This allows using an external ssh binary instead of the built in ssh library for making SFTP connections. This makes another integration test target TestSFTPRcloneSSH: Fixes #7012
43 lines
871 B
Go
43 lines
871 B
Go
// Test Sftp filesystem interface
|
|
|
|
//go:build !plan9
|
|
// +build !plan9
|
|
|
|
package sftp_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/rclone/rclone/backend/sftp"
|
|
"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: "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:",
|
|
NilObject: (*sftp.Object)(nil),
|
|
})
|
|
}
|
|
|
|
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),
|
|
})
|
|
}
|