diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-04-27 14:12:01 -0700 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2018-04-27 14:12:01 -0700 |
commit | eb9ff34fcfa51cd8205841a02f3d3d61ec5be8fa (patch) | |
tree | ed01fd9488bd86f6c2daf0b299dff5beb43973db /store/sqlstore/store_test.go | |
parent | 2386acb3ddabd8827e21b1862c338a8b13a25de6 (diff) | |
parent | 2e6b3da1d3466db379fef0d61a23e2878d17ee9d (diff) | |
download | chat-eb9ff34fcfa51cd8205841a02f3d3d61ec5be8fa.tar.gz chat-eb9ff34fcfa51cd8205841a02f3d3d61ec5be8fa.tar.bz2 chat-eb9ff34fcfa51cd8205841a02f3d3d61ec5be8fa.zip |
Merge branch 'master' into advanced-permissions-phase-2
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 |