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 удалений

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

@@ -105,6 +105,7 @@ func TestUploadFile(t *testing.T) {
info1, err = th.App.UploadFile(data, "", filename)
require.Nil(t, err, "empty channel IDs should be valid")
require.NotNil(t, info1)
info1, err = th.App.UploadFile(data, channelID, filename)
require.Nil(t, err, "UploadFile should succeed with valid data")

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

@@ -171,6 +171,7 @@ func TestUpsertGroupSyncableTeamGroupConstrained(t *testing.T) {
team, err := th.App.UpdateTeam(team)
require.Nil(t, err)
_, err = th.App.UpsertGroupSyncable(model.NewGroupTeam(group1.Id, team.Id, false))
require.Nil(t, err)
channel := th.CreateChannel(team)

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

@@ -3936,6 +3936,7 @@ func TestImportPostAndRepliesWithAttachments(t *testing.T) {
}, false)
user3, appErr := th.App.GetUserByUsername(username)
require.Nil(t, appErr, "Failed to get user3 from database.")
require.NotNil(t, user3)
username2 := model.NewId()
th.App.importUser(&UserImportData{

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

@@ -585,8 +585,7 @@ func (a *App) UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model
return nil, model.NewAppError("UpdatePost", "api.post.update_post.can_not_update_post_in_deleted.error", nil, "", http.StatusBadRequest)
}
newPost := &model.Post{}
newPost = oldPost.Clone()
newPost := oldPost.Clone()
if newPost.Message != post.Message {
newPost.Message = post.Message

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

@@ -260,8 +260,7 @@ func TestUpdatePostEditAt(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
post := &model.Post{}
post = th.BasicPost.Clone()
post := th.BasicPost.Clone()
post.IsPinned = true
saved, err := th.App.UpdatePost(post, true)
@@ -283,8 +282,7 @@ func TestUpdatePostTimeLimit(t *testing.T) {
th := Setup(t).InitBasic()
defer th.TearDown()
post := &model.Post{}
post = th.BasicPost.Clone()
post := th.BasicPost.Clone()
th.App.Srv().SetLicense(model.NewTestLicense())

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

@@ -173,6 +173,7 @@ func TestHandleCommandResponsePost(t *testing.T) {
// Command is not built in, so it is a bot command.
builtIn = false
post, err = th.App.HandleCommandResponsePost(command, args, resp, builtIn)
assert.Nil(t, err)
assert.Equal(t, "true", post.GetProp("from_webhook"))
builtIn = true