[MM-61082] Fix errcheck issues in license_test.go (#30617)
* [MM-28754] Fix errcheck issues in license_test.go - Properly handle error returned from os.WriteFile - Remove license_test.go from errcheck exceptions list in .golangci.yml Fixes https://github.com/mattermost/mattermost/issues/28754 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove empty line --------- Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
02c7678438
Коммит
4d0109feeb
@@ -160,7 +160,6 @@ issues:
|
||||
channels/store/storetest/team_store.go|\
|
||||
channels/store/storetest/thread_store.go|\
|
||||
channels/store/storetest/user_store.go|\
|
||||
channels/utils/license_test.go|\
|
||||
channels/web/oauth_test.go|\
|
||||
channels/web/saml.go|\
|
||||
channels/web/web_test.go|\
|
||||
|
||||
@@ -112,7 +112,8 @@ func TestGetLicenseFileFromDisk(t *testing.T) {
|
||||
f, err := os.CreateTemp("", "TestGetLicenseFileFromDisk")
|
||||
require.NoError(t, err)
|
||||
defer os.Remove(f.Name())
|
||||
os.WriteFile(f.Name(), []byte("not a license"), 0777)
|
||||
err = os.WriteFile(f.Name(), []byte("not a license"), 0777)
|
||||
require.NoError(t, err)
|
||||
|
||||
fileBytes := GetLicenseFileFromDisk(f.Name())
|
||||
require.NotEmpty(t, fileBytes, "should have read the file")
|
||||
|
||||
Ссылка в новой задаче
Block a user