Skip to content
Snippets Groups Projects

Creating unit tests for web hook enpoint and the notifier

All threads resolved!
Files
139
+ 3
3
@@ -89,9 +89,6 @@ func main() {
// create rego policy cache
regocache := regocache.New()
// create policy changes notifier
notifier := notify.New(events)
// connect to mongo db
db, err := mongo.Connect(
context.Background(),
@@ -112,6 +109,9 @@ func main() {
logger.Fatal("error connecting to database", zap.Error(err))
}
// create policy changes notifier
notifier := notify.New(events, storage, httpClient, logger)
// subscribe the cache for policy data changes
storage.AddPolicyChangeSubscribers(regocache, notifier)
Loading