mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 06:40:54 +03:00
event action: add update modtime to fs rename
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1235,10 +1235,12 @@ func TestEventRuleActions(t *testing.T) {
|
||||
action.Options = dataprovider.BaseEventActionOptions{
|
||||
FsConfig: dataprovider.EventActionFilesystemConfig{
|
||||
Type: dataprovider.FilesystemActionRename,
|
||||
Renames: []dataprovider.KeyValue{
|
||||
Renames: []dataprovider.RenameConfig{
|
||||
{
|
||||
Key: "/source",
|
||||
Value: "/target",
|
||||
KeyValue: dataprovider.KeyValue{
|
||||
Key: "/source",
|
||||
Value: "/target",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1778,10 +1780,12 @@ func TestFilesystemActionErrors(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
err = dataprovider.AddUser(&user, "", "", "")
|
||||
assert.NoError(t, err)
|
||||
err = executeRenameFsActionForUser([]dataprovider.KeyValue{
|
||||
err = executeRenameFsActionForUser([]dataprovider.RenameConfig{
|
||||
{
|
||||
Key: "/p1",
|
||||
Value: "/p1",
|
||||
KeyValue: dataprovider.KeyValue{
|
||||
Key: "/p1",
|
||||
Value: "/p1",
|
||||
},
|
||||
},
|
||||
}, testReplacer, user)
|
||||
if assert.Error(t, err) {
|
||||
@@ -1792,10 +1796,12 @@ func TestFilesystemActionErrors(t *testing.T) {
|
||||
Options: dataprovider.BaseEventActionOptions{
|
||||
FsConfig: dataprovider.EventActionFilesystemConfig{
|
||||
Type: dataprovider.FilesystemActionRename,
|
||||
Renames: []dataprovider.KeyValue{
|
||||
Renames: []dataprovider.RenameConfig{
|
||||
{
|
||||
Key: "/p2",
|
||||
Value: "/p2",
|
||||
KeyValue: dataprovider.KeyValue{
|
||||
Key: "/p2",
|
||||
Value: "/p2",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user