feat: complete tests

This commit is contained in:
2023-02-26 16:59:20 +01:00
parent 49a72dc34b
commit 16b0a31dd4
5 changed files with 62 additions and 15 deletions

View File

@@ -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)

View File

@@ -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) {