mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 07:10:56 +03:00
windows: fix test cases
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
package sftpd
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestWrongActions(t *testing.T) {
|
||||
actionsCopy := actions
|
||||
badCommand := "/bad/command"
|
||||
if runtime.GOOS == "windows" {
|
||||
badCommand = "C:\\bad\\command"
|
||||
}
|
||||
actions = Actions{
|
||||
ExecuteOn: []string{operationDownload},
|
||||
Command: "/bad/command",
|
||||
Command: badCommand,
|
||||
HTTPNotificationURL: "",
|
||||
}
|
||||
err := executeAction(operationDownload, "username", "path", "")
|
||||
|
||||
Reference in New Issue
Block a user