Skip to content

Commit

Permalink
errcheck issues fixed (mattermost#28693)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aryakoste authored Oct 11, 2024
1 parent 276b56d commit dd6546b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion server/.golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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|\
Expand Down
10 changes: 8 additions & 2 deletions server/channels/api4/upload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit dd6546b

Please sign in to comment.