sftp: implement Shutdown method

This commit is contained in:
Nick Craig-Wood
2020-11-27 17:25:57 +00:00
parent 47aada16a0
commit bcbe393af3
2 changed files with 33 additions and 0 deletions

View File

@@ -1932,6 +1932,15 @@ func Run(t *testing.T, opt *Opt) {
_ = operations.Purge(ctx, f, "")
}
t.Run("FsShutdown", func(t *testing.T) {
do := f.Features().Shutdown
if do == nil {
t.Skip("Shutdown method not supported")
}
require.NoError(t, do(ctx))
require.NoError(t, do(ctx), "must be able to call Shutdown twice")
})
// Remove the local directory so we don't clutter up /tmp
if strings.HasPrefix(remoteName, "/") {
t.Log("remoteName", remoteName)