Bump golangci version to v1.38.0 (#17154)

* Update golangci to v1.38.0

Co-authored-by: Claudio Costa <cstcld91@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Haardik Dharma
2021-04-28 20:13:41 +05:30
коммит произвёл GitHub
родитель 2d0f5f910a
Коммит ccc7365ac3
20 изменённых файлов: 28 добавлений и 24 удалений

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

@@ -1439,6 +1439,7 @@ func TestConvertBotToUser(t *testing.T) {
user, resp := client.ConvertBotToUser(bot.UserId, &model.UserPatch{}, false)
CheckBadRequestStatus(t, resp)
require.Nil(t, user)
user, resp = client.ConvertBotToUser(bot.UserId, &model.UserPatch{Password: model.NewString("password")}, false)
CheckNoError(t, resp)

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

@@ -101,7 +101,7 @@ func TestGetConfigAnyFlagsAccess(t *testing.T) {
defer th.TearDown()
th.Client.Login(th.BasicUser.Username, th.BasicUser.Password)
cfg, resp := th.Client.GetConfig()
_, resp := th.Client.GetConfig()
t.Run("Check permissions error with no sysconsole read permission", func(t *testing.T) {
CheckForbiddenStatus(t, resp)
@@ -111,7 +111,7 @@ func TestGetConfigAnyFlagsAccess(t *testing.T) {
th.AddPermissionToRole(model.PERMISSION_SYSCONSOLE_READ_ENVIRONMENT_RATE_LIMITING.Id, model.SYSTEM_USER_ROLE_ID)
defer th.RemovePermissionFromRole(model.PERMISSION_SYSCONSOLE_READ_ENVIRONMENT_RATE_LIMITING.Id, model.SYSTEM_USER_ROLE_ID)
cfg, resp = th.Client.GetConfig()
cfg, resp := th.Client.GetConfig()
CheckNoError(t, resp)
t.Run("Can read value with permission", func(t *testing.T) {
assert.NotNil(t, cfg.FeatureFlags)

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

@@ -1726,6 +1726,7 @@ func TestGetPostsForChannelAroundLastUnread(t *testing.T) {
require.NotNil(t, resp.Error)
require.Equal(t, "api.context.invalid_url_param.app_error", resp.Error.Id)
require.Equal(t, http.StatusBadRequest, resp.StatusCode)
require.Nil(t, posts)
// All returned posts are all read by the user, since it's created by the user itself.
posts, resp = Client.GetPostsAroundLastUnread(userId, channelId, 20, 20, false)

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

@@ -45,6 +45,7 @@ func TestCreateTermsOfServiceAdminUser(t *testing.T) {
termsOfService, resp := Client.CreateTermsOfService("terms of service new", th.SystemAdminUser.Id)
CheckErrorMessage(t, resp, "api.create_terms_of_service.custom_terms_of_service_disabled.app_error")
assert.Nil(t, termsOfService)
th.App.Srv().SetLicense(model.NewTestLicense("EnableCustomTermsOfService"))