* 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
18 строки
555 B
Go
18 строки
555 B
Go
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
|
|
}
|