MM-10658 Change config fields to pointers (#9033)

* MM 10658 Change config fields to pointers (#8898)

* Change fields of config structs to pointers and set defaults

MM-10658 https://github.com/mattermost/mattermost-server/issues/8841

* Fix tests that go broken during switching config structs to pointers

MM-10658 https://github.com/mattermost/mattermost-server/issues/8841

* Apply changes of current master while switching config structs to pointers

MM-10658 https://github.com/mattermost/mattermost-server/issues/8841

* Fix new config pointer uses

* Fix app tests

* Fix mail test

* remove debugging statement

* fix TestUpdateConfig

* assign config consistently

* initialize AmazonS3Region in TestS3TestConnection

* initialize fields for TestEmailTest

* fix TestCheckMandatoryS3Fields
This commit is contained in:
Joram Wilander
2019-01-31 08:12:01 -05:00
committed by GitHub
parent 0c981aa010
commit 2ca222033c
53 changed files with 729 additions and 516 deletions

View File

@@ -74,7 +74,7 @@ func (me *LoadTestProvider) GetTrigger() string {
}
func (me *LoadTestProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Command {
if !a.Config().ServiceSettings.EnableTesting {
if !*a.Config().ServiceSettings.EnableTesting {
return nil
}
return &model.Command{
@@ -88,7 +88,7 @@ func (me *LoadTestProvider) GetCommand(a *App, T goi18n.TranslateFunc) *model.Co
func (me *LoadTestProvider) DoCommand(a *App, args *model.CommandArgs, message string) *model.CommandResponse {
//This command is only available when EnableTesting is true
if !a.Config().ServiceSettings.EnableTesting {
if !*a.Config().ServiceSettings.EnableTesting {
return &model.CommandResponse{}
}