update pkg/sftp to the latest master

Our pull request to handle transfer errors is now merged, so updating
pkg/sftp should fix #36
This commit is contained in:
Nicola Murino 2019-09-13 08:30:22 +02:00
parent e7eb3476b7
commit fd59f35108
3 changed files with 8 additions and 2 deletions

2
go.mod
View file

@ -11,7 +11,7 @@ require (
github.com/magiconair/properties v1.8.1 // indirect
github.com/mattn/go-sqlite3 v1.11.0
github.com/pelletier/go-toml v1.4.0 // indirect
github.com/pkg/sftp v1.10.1
github.com/pkg/sftp v1.10.2-0.20190913011139-8fc59612f2b0
github.com/rs/xid v1.2.1
github.com/rs/zerolog v1.15.0
github.com/spf13/afero v1.2.2 // indirect

2
go.sum
View file

@ -82,6 +82,8 @@ github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc=
github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pkg/sftp v1.10.2-0.20190913011139-8fc59612f2b0 h1:uSPJdIuCJRCOQWSER5+E2xC2KwmgKR4XFGiOSlJdsqA=
github.com/pkg/sftp v1.10.2-0.20190913011139-8fc59612f2b0/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=

View file

@ -325,7 +325,7 @@ func TestDirCommands(t *testing.T) {
os.RemoveAll(user.GetHomeDir())
}
func TestSymlink(t *testing.T) {
func TestLink(t *testing.T) {
usePubKey := false
user, _, err := api.AddUser(getTestUser(usePubKey), http.StatusOK)
if err != nil {
@ -359,6 +359,10 @@ func TestSymlink(t *testing.T) {
if err == nil {
t.Errorf("creating a symlink to an existing one must fail")
}
err = client.Link(testFileName, testFileName+".hlink")
if err == nil {
t.Errorf("hard link is not supported and must fail")
}
err = client.Remove(testFileName + ".link")
if err != nil {
t.Errorf("error removing symlink: %v", err)