mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
WebClient: add copy action
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -6920,6 +6920,9 @@ func TestCopyAndRemoveSSHCommands(t *testing.T) {
|
||||
testFileNameCopy := testFileName + "_copy"
|
||||
out, err := runSSHCommand(fmt.Sprintf("sftpgo-copy %s %s", testFileName, testFileNameCopy), user)
|
||||
assert.NoError(t, err, string(out))
|
||||
// the resolved destination path match the source path
|
||||
out, err = runSSHCommand(fmt.Sprintf("sftpgo-copy %s %s", testFileName, path.Dir(testFileName)), user)
|
||||
assert.Error(t, err, string(out))
|
||||
|
||||
info, err := client.Stat(testFileNameCopy)
|
||||
if assert.NoError(t, err) {
|
||||
|
||||
Reference in New Issue
Block a user