From ebb0178c13433a0dd7140535020e9714a633b3d4 Mon Sep 17 00:00:00 2001 From: Rohan Sharma <117426013+RS-labhub@users.noreply.github.com> Date: Thu, 24 Oct 2024 17:28:01 +0530 Subject: [PATCH] [MM-61103] Fix errcheck issues in server/channels/app/channel_category_test.go (#28790) Co-authored-by: Ben Schumacher --- server/.golangci.yml | 1 - server/channels/app/channel_category_test.go | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index 85219c0a59..0db2af8e1a 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -98,7 +98,6 @@ issues: channels/app/busy_test.go|\ channels/app/channel.go|\ channels/app/channel_bookmark_test.go|\ - channels/app/channel_category_test.go|\ channels/app/channel_test.go|\ channels/app/config_test.go|\ channels/app/desktop_login.go|\ diff --git a/server/channels/app/channel_category_test.go b/server/channels/app/channel_category_test.go index a9bf9f568d..86a6376fa1 100644 --- a/server/channels/app/channel_category_test.go +++ b/server/channels/app/channel_category_test.go @@ -17,9 +17,15 @@ func TestSidebarCategory(t *testing.T) { defer th.TearDown() basicChannel2 := th.CreateChannel(th.Context, th.BasicTeam) - defer th.App.PermanentDeleteChannel(th.Context, basicChannel2) + defer func() { + err := th.App.PermanentDeleteChannel(th.Context, basicChannel2) + require.Nil(t, err) + }() user := th.CreateUser() - defer th.App.Srv().Store().User().PermanentDelete(th.Context, user.Id) + defer func() { + err := th.App.Srv().Store().User().PermanentDelete(th.Context, user.Id) + require.NoError(t, err) + }() th.LinkUserToTeam(user, th.BasicTeam) th.AddUserToChannel(user, basicChannel2)