From 23d06d45201750505077d9a2586a3e4ca0bc3166 Mon Sep 17 00:00:00 2001 From: Arya Khochare <91268931+Aryakoste@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:04:01 +0530 Subject: [PATCH] Errcheck issues fixed in server/channels/api4/brand_test.go (#28364) --- server/.golangci.yml | 1 - server/channels/api4/brand_test.go | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/server/.golangci.yml b/server/.golangci.yml index c52a3f85cb..1fcd068664 100644 --- a/server/.golangci.yml +++ b/server/.golangci.yml @@ -62,7 +62,6 @@ issues: channels/api4/apitestlib.go|\ channels/api4/bot_test.go|\ channels/api4/brand.go|\ - channels/api4/brand_test.go|\ channels/api4/channel.go|\ channels/api4/channel_category.go|\ channels/api4/channel_test.go|\ diff --git a/server/channels/api4/brand_test.go b/server/channels/api4/brand_test.go index 71df5e4e6b..fe16454043 100644 --- a/server/channels/api4/brand_test.go +++ b/server/channels/api4/brand_test.go @@ -22,7 +22,8 @@ func TestGetBrandImage(t *testing.T) { require.Error(t, err) CheckNotFoundStatus(t, resp) - client.Logout(context.Background()) + _, err = client.Logout(context.Background()) + require.NoError(t, err) _, resp, err = client.GetBrandImage(context.Background()) require.Error(t, err) CheckNotFoundStatus(t, resp) @@ -46,7 +47,8 @@ func TestUploadBrandImage(t *testing.T) { // status code returns either forbidden or unauthorized // note: forbidden is set as default at Client4.SetProfileImage when request is terminated early by server - client.Logout(context.Background()) + _, err = client.Logout(context.Background()) + require.NoError(t, err) resp, err = client.UploadBrandImage(context.Background(), data) require.Error(t, err) if resp.StatusCode == http.StatusForbidden { @@ -77,7 +79,8 @@ func TestDeleteBrandImage(t *testing.T) { require.Error(t, err) CheckForbiddenStatus(t, resp) - th.Client.Logout(context.Background()) + _, err = th.Client.Logout(context.Background()) + require.NoError(t, err) resp, err = th.Client.DeleteBrandImage(context.Background()) require.Error(t, err)