mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-14 04:09:29 +02:00
enable linter testifylint on v7 (#4572)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4572 Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
parent
c47bdf436b
commit
072dd9f8bc
494 changed files with 4897 additions and 4554 deletions
|
@ -20,6 +20,7 @@ import (
|
|||
_ "code.gitea.io/gitea/models/activities"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
|
@ -30,7 +31,7 @@ func testIndexer(name string, t *testing.T, indexer internal.Indexer) {
|
|||
t.Run(name, func(t *testing.T) {
|
||||
var repoID int64 = 1
|
||||
err := index(git.DefaultContext, indexer, repoID)
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
keywords := []struct {
|
||||
RepoIDs []int64
|
||||
Keyword string
|
||||
|
@ -86,7 +87,7 @@ func testIndexer(name string, t *testing.T, indexer internal.Indexer) {
|
|||
},
|
||||
IsKeywordFuzzy: true,
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
assert.Len(t, kw.IDs, int(total))
|
||||
assert.Len(t, langs, kw.Langs)
|
||||
|
||||
|
@ -99,7 +100,7 @@ func testIndexer(name string, t *testing.T, indexer internal.Indexer) {
|
|||
})
|
||||
}
|
||||
|
||||
assert.NoError(t, indexer.Delete(context.Background(), repoID))
|
||||
require.NoError(t, indexer.Delete(context.Background(), repoID))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue