[MM-61463] Fix errcheck issues in post_helpers_test.go (#30609)

* [MM-61463] Fix errcheck issues in post_helpers_test.go

- Added proper error handling for System.Save calls
- Removed post_helpers_test.go from errcheck ignore list in .golangci.yml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add back         channels/app/plugin_test.go|

* Fix server/.golangci.yml

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Ben Schumacher 2025-04-11 13:51:08 +02:00 committed by GitHub
parent 5c5aa06fea
commit b8bf2e235d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -102,7 +102,6 @@ issues:
channels/app/platform/session.go|\
channels/app/platform/status.go|\
channels/app/platform/web_hub_test.go|\
channels/app/post_helpers_test.go|\
channels/app/post_test.go|\
channels/app/slack.go|\
channels/app/slashcommands/auto_environment.go|\

View file

@ -195,10 +195,11 @@ func TestGetTimeSortedPostAccessibleBounds(t *testing.T) {
func TestFilterInaccessiblePosts(t *testing.T) {
th := Setup(t)
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
th.App.Srv().Store().System().Save(&model.System{
err := th.App.Srv().Store().System().Save(&model.System{
Name: model.SystemLastAccessiblePostTime,
Value: "2",
})
require.NoError(t, err)
defer th.TearDown()
@ -323,10 +324,11 @@ func TestFilterInaccessiblePosts(t *testing.T) {
func TestGetFilteredAccessiblePosts(t *testing.T) {
th := Setup(t)
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
th.App.Srv().Store().System().Save(&model.System{
err := th.App.Srv().Store().System().Save(&model.System{
Name: model.SystemLastAccessiblePostTime,
Value: "2",
})
require.NoError(t, err)
defer th.TearDown()
@ -364,10 +366,11 @@ func TestGetFilteredAccessiblePosts(t *testing.T) {
func TestIsInaccessiblePost(t *testing.T) {
th := Setup(t)
th.App.Srv().SetLicense(model.NewTestLicense("cloud"))
th.App.Srv().Store().System().Save(&model.System{
err := th.App.Srv().Store().System().Save(&model.System{
Name: model.SystemLastAccessiblePostTime,
Value: "2",
})
require.NoError(t, err)
defer th.TearDown()