mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-05 09:55:20 +02:00
Add testifylint to lint checks (#4535)
go-require lint is ignored for now Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4535 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
parent
94933470cd
commit
4de909747b
504 changed files with 5028 additions and 4680 deletions
|
@ -12,6 +12,7 @@ import (
|
|||
webhook_module "code.gitea.io/gitea/modules/webhook"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_AddPayloadVersionToHookTaskTable(t *testing.T) {
|
||||
|
@ -40,14 +41,14 @@ func Test_AddPayloadVersionToHookTaskTable(t *testing.T) {
|
|||
return
|
||||
}
|
||||
|
||||
assert.NoError(t, AddPayloadVersionToHookTaskTable(x))
|
||||
require.NoError(t, AddPayloadVersionToHookTaskTable(x))
|
||||
|
||||
expected := []HookTaskMigrated{}
|
||||
assert.NoError(t, x.Table("hook_task_migrated").Asc("id").Find(&expected))
|
||||
require.NoError(t, x.Table("hook_task_migrated").Asc("id").Find(&expected))
|
||||
assert.Len(t, expected, 2)
|
||||
|
||||
got := []HookTaskMigrated{}
|
||||
assert.NoError(t, x.Table("hook_task").Asc("id").Find(&got))
|
||||
require.NoError(t, x.Table("hook_task").Asc("id").Find(&got))
|
||||
|
||||
for i, expected := range expected {
|
||||
expected, got := expected, got[i]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue