This commit is contained in:
Nicola Murino
2021-02-11 19:45:52 +01:00
parent 4ddfe41f23
commit 51f110bc7b
31 changed files with 428 additions and 77 deletions

View File

@@ -376,6 +376,11 @@ func TestWithInvalidHome(t *testing.T) {
}
_, err = c.Fs.ResolvePath("../upper_path")
assert.Error(t, err, "tested path is not a home subdir")
_, err = c.StatVFS(&sftp.Request{
Method: "StatVFS",
Filepath: "../unresolvable-path",
})
assert.Error(t, err)
}
func TestSFTPCmdTargetPath(t *testing.T) {
@@ -408,7 +413,7 @@ func TestSFTPGetUsedQuota(t *testing.T) {
connection := Connection{
BaseConnection: common.NewBaseConnection("", common.ProtocolSFTP, u, nil),
}
quotaResult := connection.HasSpace(false, "/")
quotaResult := connection.HasSpace(false, false, "/")
assert.False(t, quotaResult.HasSpace)
}