mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-01 14:44:35 -04: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
|
@ -23,6 +23,7 @@ import (
|
|||
repo_service "code.gitea.io/gitea/services/repository"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAPIPushMirror(t *testing.T) {
|
||||
|
@ -35,7 +36,7 @@ func testAPIPushMirror(t *testing.T, u *url.URL) {
|
|||
defer test.MockProtect(&mirror_service.AddPushMirrorRemote)()
|
||||
defer test.MockProtect(&repo_model.DeletePushMirrors)()
|
||||
|
||||
assert.NoError(t, migrations.Init())
|
||||
require.NoError(t, migrations.Init())
|
||||
|
||||
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 1})
|
||||
srcRepo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
|
||||
|
@ -47,7 +48,7 @@ func testAPIPushMirror(t *testing.T, u *url.URL) {
|
|||
mirrorRepo, err := repo_service.CreateRepositoryDirectly(db.DefaultContext, user, user, repo_service.CreateRepoOptions{
|
||||
Name: "test-push-mirror",
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
remoteAddress := fmt.Sprintf("%s%s/%s", u.String(), url.PathEscape(user.Name), url.PathEscape(mirrorRepo.Name))
|
||||
|
||||
deletePushMirrors := repo_model.DeletePushMirrors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue