Errcheck issues fixed in server/channels/api4/brand_test.go (#28364)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
edf5610b48
Коммит
23d06d4520
@@ -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)
|
||||
|
||||
Ссылка в новой задаче
Block a user