diff options
author | Chris <ccbrown112@gmail.com> | 2018-01-11 15:23:41 -0600 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2018-01-11 13:23:41 -0800 |
commit | 1d9efd0e39a9663bb2fbf52b3353fe21ac3b6954 (patch) | |
tree | 5518bf9683e2fcbcb6b4e0acd3643a3146574ec4 /api4/apitestlib.go | |
parent | 6990d052d5e95295e729aae28a0d30bfdcb98573 (diff) | |
download | chat-1d9efd0e39a9663bb2fbf52b3353fe21ac3b6954.tar.gz chat-1d9efd0e39a9663bb2fbf52b3353fe21ac3b6954.tar.bz2 chat-1d9efd0e39a9663bb2fbf52b3353fe21ac3b6954.zip |
Remove global config watcher (#8080)
* remove global config watcher
* keep config watcher disabled for tests
* compile fix
* fix resource leak
Diffstat (limited to 'api4/apitestlib.go')
-rw-r--r-- | api4/apitestlib.go | 9 |
1 files changed, 7 insertions, 2 deletions
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() |