github.com/artpar/rclone@v1.67.3/backend/sftp/sftp_test.go (about)

     1  // Test Sftp filesystem interface
     2  
     3  //go:build !plan9
     4  
     5  package sftp_test
     6  
     7  import (
     8  	"testing"
     9  
    10  	"github.com/artpar/rclone/backend/sftp"
    11  	"github.com/artpar/rclone/fstest"
    12  	"github.com/artpar/rclone/fstest/fstests"
    13  )
    14  
    15  // TestIntegration runs integration tests against the remote
    16  func TestIntegration(t *testing.T) {
    17  	fstests.Run(t, &fstests.Opt{
    18  		RemoteName: "TestSFTPOpenssh:",
    19  		NilObject:  (*sftp.Object)(nil),
    20  	})
    21  }
    22  
    23  func TestIntegration2(t *testing.T) {
    24  	if *fstest.RemoteName != "" {
    25  		t.Skip("skipping as -remote is set")
    26  	}
    27  	fstests.Run(t, &fstests.Opt{
    28  		RemoteName: "TestSFTPRclone:",
    29  		NilObject:  (*sftp.Object)(nil),
    30  	})
    31  }
    32  
    33  func TestIntegration3(t *testing.T) {
    34  	if *fstest.RemoteName != "" {
    35  		t.Skip("skipping as -remote is set")
    36  	}
    37  	fstests.Run(t, &fstests.Opt{
    38  		RemoteName: "TestSFTPRcloneSSH:",
    39  		NilObject:  (*sftp.Object)(nil),
    40  	})
    41  }