GH-28752 fix errcheck lint issues in server/channels/testlib/helper.go (#29260)
Этот коммит содержится в:
@@ -203,7 +203,6 @@ issues:
|
|||||||
channels/store/storetest/team_store.go|\
|
channels/store/storetest/team_store.go|\
|
||||||
channels/store/storetest/thread_store.go|\
|
channels/store/storetest/thread_store.go|\
|
||||||
channels/store/storetest/user_store.go|\
|
channels/store/storetest/user_store.go|\
|
||||||
channels/testlib/helper.go|\
|
|
||||||
channels/utils/license_test.go|\
|
channels/utils/license_test.go|\
|
||||||
channels/web/oauth_test.go|\
|
channels/web/oauth_test.go|\
|
||||||
channels/web/saml.go|\
|
channels/web/saml.go|\
|
||||||
|
|||||||
@@ -73,10 +73,16 @@ func NewMainHelperWithOptions(options *HelperOptions) *MainHelper {
|
|||||||
Logger: logger,
|
Logger: logger,
|
||||||
}
|
}
|
||||||
|
|
||||||
mlog.NewLogger()
|
_, err := mlog.NewLogger()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
utils.TranslationsPreInit()
|
err = utils.TranslationsPreInit()
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
if options != nil {
|
if options != nil {
|
||||||
if options.EnableStore && !testing.Short() {
|
if options.EnableStore && !testing.Short() {
|
||||||
@@ -92,7 +98,13 @@ func NewMainHelperWithOptions(options *HelperOptions) *MainHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (h *MainHelper) Main(m *testing.M) {
|
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 != "" {
|
if h.testResourcePath != "" {
|
||||||
prevDir, err := os.Getwd()
|
prevDir, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user