From dd6546bd5ea2fddab27682b02ee16ab9e6c14113 Mon Sep 17 00:00:00 2001 From: Arya Khochare <91268931+Aryakoste@users.noreply.github.com> Date: Fri, 11 Oct 2024 19:46:46 +0530 Subject: [PATCH] errcheck issues fixed (#28693) --- server/.golangci.yml | 1 - server/channels/api4/upload_test.go | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index 4f172e8f616..b72e9ffe10b 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -93,7 +93,6 @@ issues: channels/api4/system_test.go|\ channels/api4/team_local.go|\ channels/api4/team_test.go|\ - channels/api4/upload_test.go|\ channels/api4/user.go|\ channels/api4/user_local.go|\ channels/api4/user_test.go|\ diff --git a/server/channels/api4/upload_test.go b/server/channels/api4/upload_test.go index 514e0920117..0c334818f19 100644 --- a/server/channels/api4/upload_test.go +++ b/server/channels/api4/upload_test.go @@ -59,7 +59,10 @@ func TestCreateUpload(t *testing.T) { t.Run("not allowed in cloud", func(t *testing.T) { th.App.Srv().SetLicense(model.NewTestLicense("cloud")) - defer th.App.Srv().RemoveLicense() + defer func() { + appErr := th.App.Srv().RemoveLicense() + require.Nil(t, appErr) + }() u, resp, err := th.SystemAdminClient.CreateUpload(context.Background(), &model.UploadSession{ ChannelId: th.BasicChannel.Id, @@ -252,7 +255,10 @@ func TestUploadData(t *testing.T) { t.Run("not allowed in cloud", func(t *testing.T) { th.App.Srv().SetLicense(model.NewTestLicense("cloud")) - defer th.App.Srv().RemoveLicense() + defer func() { + appErr := th.App.Srv().RemoveLicense() + require.Nil(t, appErr) + }() us2 := &model.UploadSession{ Id: model.NewId(),