MM-11262: database config store (#10281)
* vendor github.com/jmoiron/sqlx * MM-11262: introduce a database store * revert unnecessary fmt.Errorf * simplify unit test helper methods * remote TODO re: retry * relocate initializeConfigurationsTable for clarity * factor out a commonStore * acquire database config lock on close for safety * add missing header * fix lock comment
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
898a3a289c
Коммит
9bf5687311
17
config/common_test.go
Обычный файл
17
config/common_test.go
Обычный файл
@@ -0,0 +1,17 @@
|
||||
package config_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/mattermost/mattermost-server/model"
|
||||
)
|
||||
|
||||
func prepareExpectedConfig(t *testing.T, expectedCfg *model.Config) *model.Config {
|
||||
// These fields require special initialization for our tests.
|
||||
expectedCfg = expectedCfg.Clone()
|
||||
expectedCfg.MessageExportSettings.GlobalRelaySettings = &model.GlobalRelayMessageExportSettings{}
|
||||
expectedCfg.PluginSettings.Plugins = make(map[string]map[string]interface{})
|
||||
expectedCfg.PluginSettings.PluginStates = make(map[string]*model.PluginState)
|
||||
|
||||
return expectedCfg
|
||||
}
|
||||
Ссылка в новой задаче
Block a user