mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00: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
|
@ -25,6 +25,7 @@ import (
|
|||
"code.gitea.io/gitea/tests"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func testCreateBranch(t testing.TB, session *TestSession, user, repo, oldRefSubURL, newBranchName string, expectedStatus int) string {
|
||||
|
@ -177,13 +178,13 @@ func TestDatabaseMissingABranch(t *testing.T) {
|
|||
|
||||
// Run the repo branch sync, to ensure the db and git agree.
|
||||
err2 := repo_service.AddAllRepoBranchesToSyncQueue(graceful.GetManager().ShutdownContext())
|
||||
assert.NoError(t, err2)
|
||||
require.NoError(t, err2)
|
||||
|
||||
// Delete one branch from git only, leaving it in the database
|
||||
repo := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 1})
|
||||
cmd := git.NewCommand(db.DefaultContext, "branch", "-D").AddDynamicArguments("will-be-missing")
|
||||
_, _, err := cmd.RunStdString(&git.RunOpts{Dir: repo.RepoPath()})
|
||||
assert.NoError(t, err)
|
||||
require.NoError(t, err)
|
||||
|
||||
// Verify that loading the repo's branches page works still, and that it
|
||||
// reports at least three branches (master, will-be-present, and
|
||||
|
@ -196,7 +197,7 @@ func TestDatabaseMissingABranch(t *testing.T) {
|
|||
|
||||
// Run the repo branch sync again
|
||||
err2 = repo_service.AddAllRepoBranchesToSyncQueue(graceful.GetManager().ShutdownContext())
|
||||
assert.NoError(t, err2)
|
||||
require.NoError(t, err2)
|
||||
|
||||
// Verify that loading the repo's branches page works still, and that it
|
||||
// reports one branch less than the first time.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue