mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
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:
@@ -250,7 +250,7 @@ func setupConnection(con_type string, dataSource string, settings *model.SqlSett
|
||||
os.Exit(EXIT_NO_DRIVER)
|
||||
}
|
||||
|
||||
if settings.Trace {
|
||||
if settings.Trace != nil && *settings.Trace {
|
||||
dbmap.TraceOn("", sqltrace.New(os.Stdout, "sql-trace:", sqltrace.Lmicroseconds))
|
||||
}
|
||||
|
||||
|
||||
@@ -136,8 +136,8 @@ func databaseSettings(driver, dataSource string) *model.SqlSettings {
|
||||
MaxIdleConns: new(int),
|
||||
ConnMaxLifetimeMilliseconds: new(int),
|
||||
MaxOpenConns: new(int),
|
||||
Trace: false,
|
||||
AtRestEncryptKey: model.NewRandomString(32),
|
||||
Trace: model.NewBool(false),
|
||||
AtRestEncryptKey: model.NewString(model.NewRandomString(32)),
|
||||
QueryTimeout: new(int),
|
||||
}
|
||||
*settings.MaxIdleConns = 10
|
||||
|
||||
Reference in New Issue
Block a user