[MM-61512] Fix errcheck issues in server/channels/app/users/helper_test.go (#29167)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
This commit is contained in:
Seiya Homma 2024-11-14 18:19:52 +09:00 committed by GitHub
parent 701d1dbd68
commit 6e81e8c35c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -150,7 +150,6 @@ issues:
channels/app/upload_test.go|\
channels/app/user.go|\
channels/app/user_test.go|\
channels/app/users/helper_test.go|\
channels/app/web_broadcast_hooks_test.go|\
channels/app/webhook_test.go|\
channels/jobs/batch_worker_test.go|\

View file

@ -15,6 +15,7 @@ import (
"github.com/mattermost/mattermost/server/public/shared/request"
"github.com/mattermost/mattermost/server/v8/channels/store"
"github.com/mattermost/mattermost/server/v8/config"
"github.com/stretchr/testify/require"
)
var initBasicOnce sync.Once
@ -45,7 +46,7 @@ func Setup(tb testing.TB) *TestHelper {
return setupTestHelper(dbStore, false, tb)
}
func setupTestHelper(s store.Store, includeCacheLayer bool, tb testing.TB) *TestHelper {
func setupTestHelper(s store.Store, _ bool, tb testing.TB) *TestHelper {
tempWorkspace, err := os.MkdirTemp("", "userservicetest")
if err != nil {
panic(err)
@ -69,7 +70,8 @@ func setupTestHelper(s store.Store, includeCacheLayer bool, tb testing.TB) *Test
*config.PasswordSettings.Uppercase = false
*config.PasswordSettings.Symbol = false
*config.PasswordSettings.Number = false
configStore.Set(config)
_, _, err = configStore.Set(config)
require.NoError(tb, err)
buffer := &bytes.Buffer{}
return &TestHelper{