mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user