github.com/justinjmoses/evergreen@v0.0.0-20170530173719-1d50e381ff0d/remote/sftp_test.go (about) 1 package remote 2 3 import ( 4 "testing" 5 6 "github.com/evergreen-ci/evergreen/command" 7 . "github.com/smartystreets/goconvey/convey" 8 ) 9 10 func TestSFTPGateway(t *testing.T) { 11 t.Skipf("the fixtures for remote ssh are not properly configured/conceived.") 12 13 Convey("When using an SFTPGateway", t, func() { 14 gateway := &SFTPGateway{ 15 Host: command.TestRemote + ":22", 16 User: command.TestRemoteUser, 17 Keyfile: command.TestRemoteKey, 18 } 19 20 Convey("the encapsualted client should be usable after the Init() call", func() { 21 22 So(gateway.Init(), ShouldBeNil) 23 defer gateway.Close() 24 25 So(gateway.Client, ShouldNotBeNil) 26 file, err := gateway.Client.Create("test.txt") 27 So(err, ShouldBeNil) 28 So(file, ShouldNotBeNil) 29 So(file.Close(), ShouldBeNil) 30 31 }) 32 33 }) 34 35 }