mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Refactor mlog - simplify mlog by removing redundant code - remove Zap dependency - update unit test helpers - update logging config - update auditing
33 lines
655 B
Go
33 lines
655 B
Go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
package app
|
|
|
|
import (
|
|
"flag"
|
|
"testing"
|
|
|
|
"github.com/mattermost/mattermost-server/v6/testlib"
|
|
)
|
|
|
|
var mainHelper *testlib.MainHelper
|
|
var replicaFlag bool
|
|
|
|
func TestMain(m *testing.M) {
|
|
if f := flag.Lookup("mysql-replica"); f == nil {
|
|
flag.BoolVar(&replicaFlag, "mysql-replica", false, "")
|
|
flag.Parse()
|
|
}
|
|
|
|
var options = testlib.HelperOptions{
|
|
EnableStore: true,
|
|
EnableResources: true,
|
|
WithReadReplica: replicaFlag,
|
|
}
|
|
|
|
mainHelper = testlib.NewMainHelperWithOptions(&options)
|
|
defer mainHelper.Close()
|
|
|
|
mainHelper.Main(m)
|
|
}
|