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 --- api/apitestlib.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'api') diff --git a/api/apitestlib.go b/api/apitestlib.go index 547071e93..7e3c10efc 100644 --- a/api/apitestlib.go +++ b/api/apitestlib.go @@ -64,13 +64,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