Enable the errorAssertions govet check for mattermost-server code (#17346)

* Enable the errorAssertions govet check for mattermost-server code

* Removing unnecesary change

* Fixing some tests

* Fixing tests

* Fixing more after merge

* Fixing new offending entries

* Fixing small vet checks

* Fixing new cases detected by govet

* Fixing remote_cluster_test errors

* Fixing assertion

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2021-04-12 12:51:31 +02:00
коммит произвёл GitHub
родитель e37e902ddf
Коммит 35d00b4644
22 изменённых файлов: 202 добавлений и 199 удалений

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

@@ -3384,7 +3384,7 @@ func TestLoginWithLag(t *testing.T) {
defer mainHelper.ToggleReplicasOff()
cmdErr := mainHelper.SetReplicationLagForTesting(5)
require.Nil(t, cmdErr)
require.NoError(t, cmdErr)
defer mainHelper.SetReplicationLagForTesting(0)
_, resp := th.Client.Login(th.BasicUser.Email, th.BasicUser.Password)
@@ -6083,7 +6083,7 @@ func TestSetProfileImageWithProviderAttributes(t *testing.T) {
doCleanup := func(t *testing.T, th *TestHelper, user *model.User) {
info := &model.FileInfo{Path: "users/" + user.Id + "/profile.png"}
err = th.cleanupTestFile(info)
require.Nil(t, err)
require.NoError(t, err)
}
t.Run("LDAP user", func(t *testing.T) {