mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
copy: use server side copy if available
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -627,3 +627,21 @@ func TestConnectionKeepAlive(t *testing.T) {
|
||||
keepConnectionAlive(conn, done, 50*time.Millisecond)
|
||||
assert.Greater(t, conn.GetLastActivity(), lastActivity)
|
||||
}
|
||||
|
||||
func TestFsFileCopier(t *testing.T) {
|
||||
fs := vfs.Fs(&vfs.AzureBlobFs{})
|
||||
_, ok := fs.(vfs.FsFileCopier)
|
||||
assert.True(t, ok)
|
||||
fs = vfs.Fs(&vfs.OsFs{})
|
||||
_, ok = fs.(vfs.FsFileCopier)
|
||||
assert.False(t, ok)
|
||||
fs = vfs.Fs(&vfs.SFTPFs{})
|
||||
_, ok = fs.(vfs.FsFileCopier)
|
||||
assert.False(t, ok)
|
||||
fs = vfs.Fs(&vfs.GCSFs{})
|
||||
_, ok = fs.(vfs.FsFileCopier)
|
||||
assert.True(t, ok)
|
||||
fs = vfs.Fs(&vfs.S3Fs{})
|
||||
_, ok = fs.(vfs.FsFileCopier)
|
||||
assert.True(t, ok)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user