github.com/trigonella/mattermost-server@v5.11.1+incompatible/config/export_test.go (about) 1 package config 2 3 import ( 4 "io" 5 6 "github.com/jmoiron/sqlx" 7 "github.com/mattermost/mattermost-server/model" 8 ) 9 10 // MarshalConfig exposes the internal marshalConfig to tests only. 11 func MarshalConfig(cfg *model.Config) ([]byte, error) { 12 return marshalConfig(cfg) 13 } 14 15 // UnmarshalConfig exposes the internal unmarshalConfig to tests only. 16 func UnmarshalConfig(r io.Reader, allowEnvironmentOverrides bool) (*model.Config, map[string]interface{}, error) { 17 return unmarshalConfig(r, allowEnvironmentOverrides) 18 } 19 20 // InitializeConfigurationsTable exposes the internal initializeConfigurationsTable to test only. 21 func InitializeConfigurationsTable(db *sqlx.DB) error { 22 return initializeConfigurationsTable(db) 23 } 24 25 // ResolveConfigFilePath exposes the internal resolveConfigFilePath to test only. 26 func ResolveConfigFilePath(path string) (string, error) { 27 return resolveConfigFilePath(path) 28 }