[MM-30436] Add support for configuration custom defaults (#16265)

* [MM-30436] Add support for configuration custom defaults

* Addressing review comments

* Addressing PR comments

* Soft fail if the configuration defaults cannot be read

* Directly print error in log message

* Fix linter

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Miguel de la Cruz
2020-11-16 15:25:48 +01:00
коммит произвёл GitHub
родитель c82c37a36e
Коммит 6c857a4525
18 изменённых файлов: 334 добавлений и 131 удалений

Просмотреть файл

@@ -386,7 +386,7 @@ func TestSentry(t *testing.T) {
s, err := NewServer(func(server *Server) error {
configStore, _ := config.NewFileStore("config.json", true)
store, _ := config.NewStoreFromBacking(configStore)
store, _ := config.NewStoreFromBacking(configStore, nil)
server.configStore = store
server.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ListenAddress = ":0"
@@ -437,7 +437,7 @@ func TestSentry(t *testing.T) {
s, err := NewServer(func(server *Server) error {
configStore, _ := config.NewFileStore("config.json", true)
store, _ := config.NewStoreFromBacking(configStore)
store, _ := config.NewStoreFromBacking(configStore, nil)
server.configStore = store
server.UpdateConfig(func(cfg *model.Config) {
*cfg.ServiceSettings.ListenAddress = ":0"