Errcheck issues fixed in server/channels/api4/brand_test.go (#28364)

Этот коммит содержится в:
Arya Khochare
2024-10-01 20:04:01 +05:30
коммит произвёл GitHub
родитель edf5610b48
Коммит 23d06d4520
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@@ -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|\

Просмотреть файл

@@ -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)