feat: complete tests
This commit is contained in:
@@ -5,8 +5,14 @@ import (
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
)
|
||||
|
||||
type NotifyIface interface {
|
||||
NewWatcher() (*fsnotify.Watcher, error)
|
||||
}
|
||||
|
||||
type WatcherIface interface {
|
||||
Monitor(path string) error
|
||||
Listen(binaryPath, scriptPath string, outputErr chan<- error)
|
||||
|
||||
@@ -3,12 +3,13 @@ package watcher
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"gitea.urkob.com/urko/git-webhook-ci/cfg"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
var (
|
||||
binaryPath = "/bin/bash"
|
||||
scriptPath = "./test-script.sh"
|
||||
scriptPath = cfg.RootDir() + "/test-script.sh"
|
||||
)
|
||||
|
||||
func TestDeploy(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user