From 1d9efd0e39a9663bb2fbf52b3353fe21ac3b6954 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 11 Jan 2018 15:23:41 -0600 Subject: Remove global config watcher (#8080) * remove global config watcher * keep config watcher disabled for tests * compile fix * fix resource leak --- api4/apitestlib.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'api4/apitestlib.go') diff --git a/api4/apitestlib.go b/api4/apitestlib.go index eab27173f..4c0fbf509 100644 --- a/api4/apitestlib.go +++ b/api4/apitestlib.go @@ -73,13 +73,18 @@ func StopTestStore() { } func setupTestHelper(enterprise bool) *TestHelper { - var options []app.Option + options := []app.Option{app.DisableConfigWatch} if testStore != nil { options = append(options, app.StoreOverride(testStore)) } + a, err := app.New(options...) + if err != nil { + panic(err) + } + th := &TestHelper{ - App: app.New(options...), + App: a, } th.originalConfig = th.App.Config().Clone() -- cgit v1.2.3-1-g7c22