github.com/mad-app/mattermost-server/v5@v5.100.1/config/export_test.go (about)

     1  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
     2  // See LICENSE.txt for license information.
     3  
     4  package config
     5  
     6  import (
     7  	"io"
     8  
     9  	"github.com/jmoiron/sqlx"
    10  	"github.com/mad-app/mattermost-server/v5/model"
    11  )
    12  
    13  // MarshalConfig exposes the internal marshalConfig to tests only.
    14  func MarshalConfig(cfg *model.Config) ([]byte, error) {
    15  	return marshalConfig(cfg)
    16  }
    17  
    18  // UnmarshalConfig exposes the internal unmarshalConfig to tests only.
    19  func UnmarshalConfig(r io.Reader, allowEnvironmentOverrides bool) (*model.Config, map[string]interface{}, error) {
    20  	return unmarshalConfig(r, allowEnvironmentOverrides)
    21  }
    22  
    23  // InitializeConfigurationsTable exposes the internal initializeConfigurationsTable to test only.
    24  func InitializeConfigurationsTable(db *sqlx.DB) error {
    25  	return initializeConfigurationsTable(db)
    26  }