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

@@ -11,13 +11,17 @@ import (
pkgwatcher "gitea.urkob.com/urko/git-webhook-ci/pkg/watcher"
)
var watcherIface pkgwatcher.WatcherIface
var (
watcherIface pkgwatcher.WatcherIface
notifierIface pkgwatcher.NotifyIface
)
func main() {
isProd := os.Getenv("ENV") == "prod"
config := cfg.NewConfig(isProd)
watcherIface = watcher.NewWatcher(pkgwatcher.Deploy)
notifierIface = watcher.NewNotifier()
watcherIface = watcher.NewWatcher(notifierIface, pkgwatcher.Deploy)
defer func() {
if err := watcherIface.Close(); err != nil {