Remove global config watcher (#8080)

* remove global config watcher

* keep config watcher disabled for tests

* compile fix

* fix resource leak
This commit is contained in:
Chris
2018-01-11 15:23:41 -06:00
committed by Corey Hulen
parent 6990d052d5
commit 1d9efd0e39
12 changed files with 215 additions and 175 deletions

View File

@@ -38,7 +38,10 @@ func StopTestStore() {
}
func Setup() *app.App {
a := app.New(app.StoreOverride(testStore))
a, err := app.New(app.StoreOverride(testStore), app.DisableConfigWatch)
if err != nil {
panic(err)
}
prevListenAddress := *a.Config().ServiceSettings.ListenAddress
a.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.ListenAddress = ":0" })
a.StartServer()