mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
GH-28752 fix errcheck lint issues in server/channels/testlib/helper.go (#29260)
This commit is contained in:
parent
18c5fe8f6a
commit
f48fd7b791
2 changed files with 15 additions and 4 deletions
|
|
@ -203,7 +203,6 @@ issues:
|
|||
channels/store/storetest/team_store.go|\
|
||||
channels/store/storetest/thread_store.go|\
|
||||
channels/store/storetest/user_store.go|\
|
||||
channels/testlib/helper.go|\
|
||||
channels/utils/license_test.go|\
|
||||
channels/web/oauth_test.go|\
|
||||
channels/web/saml.go|\
|
||||
|
|
|
|||
|
|
@ -73,10 +73,16 @@ func NewMainHelperWithOptions(options *HelperOptions) *MainHelper {
|
|||
Logger: logger,
|
||||
}
|
||||
|
||||
mlog.NewLogger()
|
||||
_, err := mlog.NewLogger()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
flag.Parse()
|
||||
|
||||
utils.TranslationsPreInit()
|
||||
err = utils.TranslationsPreInit()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if options != nil {
|
||||
if options.EnableStore && !testing.Short() {
|
||||
|
|
@ -92,7 +98,13 @@ func NewMainHelperWithOptions(options *HelperOptions) *MainHelper {
|
|||
}
|
||||
|
||||
func (h *MainHelper) Main(m *testing.M) {
|
||||
defer h.Logger.Shutdown()
|
||||
defer func() {
|
||||
err := h.Logger.Shutdown()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}()
|
||||
|
||||
if h.testResourcePath != "" {
|
||||
prevDir, err := os.Getwd()
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue