diff options
Diffstat (limited to 'store/sqlstore/store_test.go')
-rw-r--r-- | store/sqlstore/store_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/store/sqlstore/store_test.go b/store/sqlstore/store_test.go index 41d6a9b7e..58065d65d 100644 --- a/store/sqlstore/store_test.go +++ b/store/sqlstore/store_test.go @@ -8,6 +8,7 @@ import ( "sync" "testing" + "github.com/mattermost/mattermost-server/mlog" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/store" "github.com/mattermost/mattermost-server/store/storetest" @@ -98,6 +99,15 @@ func tearDownStores() { } func TestMain(m *testing.M) { + // Setup a global logger to catch tests logging outside of app context + // The global logger will be stomped by apps initalizing but that's fine for testing. Ideally this won't happen. + mlog.InitGlobalLogger(mlog.NewLogger(&mlog.LoggerConfiguration{ + EnableConsole: true, + ConsoleJson: true, + ConsoleLevel: "error", + EnableFile: false, + })) + utils.TranslationsPreInit() status := 0 |