mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 20:02:09 +00:00
Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367)
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
Some checks failed
/ release (push) Waiting to run
testing / backend-checks (push) Has been skipped
testing / frontend-checks (push) Has been skipped
testing / test-unit (push) Has been skipped
testing / test-e2e (push) Has been skipped
testing / test-mysql (push) Has been skipped
testing / test-pgsql (push) Has been skipped
testing / test-sqlite (push) Has been skipped
testing / test-remote-cacher (redis) (push) Has been skipped
testing / test-remote-cacher (valkey) (push) Has been skipped
testing / test-remote-cacher (garnet) (push) Has been skipped
testing / test-remote-cacher (redict) (push) Has been skipped
testing / security-check (push) Has been skipped
Integration tests for the release process / release-simulation (push) Has been cancelled
Co-authored-by: Renovate Bot <forgejo-renovate-action@forgejo.org> Co-committed-by: Renovate Bot <forgejo-renovate-action@forgejo.org>
This commit is contained in:
parent
51ff4970ec
commit
fed2d81c44
427 changed files with 2043 additions and 2046 deletions
|
@ -43,7 +43,7 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
|
|||
// Check if master branch has been locked successfully
|
||||
flashCookie := session.GetCookie(gitea_context.CookieNameFlash)
|
||||
assert.NotNil(t, flashCookie)
|
||||
assert.EqualValues(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522master%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
|
||||
assert.Equal(t, "success%3DBranch%2Bprotection%2Bfor%2Brule%2B%2522master%2522%2Bhas%2Bbeen%2Bupdated.", flashCookie.Value)
|
||||
|
||||
// Request editor page
|
||||
req = NewRequest(t, "GET", "/user2/repo1/_new/master/")
|
||||
|
@ -79,12 +79,12 @@ func TestCreateFileOnProtectedBranch(t *testing.T) {
|
|||
|
||||
res := make(map[string]string)
|
||||
require.NoError(t, json.NewDecoder(resp.Body).Decode(&res))
|
||||
assert.EqualValues(t, "/user2/repo1/settings/branches", res["redirect"])
|
||||
assert.Equal(t, "/user2/repo1/settings/branches", res["redirect"])
|
||||
|
||||
// Check if master branch has been locked successfully
|
||||
flashCookie = session.GetCookie(gitea_context.CookieNameFlash)
|
||||
assert.NotNil(t, flashCookie)
|
||||
assert.EqualValues(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25221%2522%2Bfailed.", flashCookie.Value)
|
||||
assert.Equal(t, "error%3DRemoving%2Bbranch%2Bprotection%2Brule%2B%25221%2522%2Bfailed.", flashCookie.Value)
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ func testEditFile(t *testing.T, session *TestSession, user, repo, branch, filePa
|
|||
// Verify the change
|
||||
req = NewRequest(t, "GET", path.Join(user, repo, "raw/branch", branch, filePath))
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
assert.EqualValues(t, newContent, resp.Body.String())
|
||||
assert.Equal(t, newContent, resp.Body.String())
|
||||
|
||||
return resp
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ func testEditFileToNewBranch(t *testing.T, session *TestSession, user, repo, bra
|
|||
// Verify the change
|
||||
req = NewRequest(t, "GET", path.Join(user, repo, "raw/branch", targetBranch, filePath))
|
||||
resp = session.MakeRequest(t, req, http.StatusOK)
|
||||
assert.EqualValues(t, newContent, resp.Body.String())
|
||||
assert.Equal(t, newContent, resp.Body.String())
|
||||
|
||||
return resp
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ func TestEditorAddTranslation(t *testing.T) {
|
|||
|
||||
placeholder, ok := htmlDoc.Find("input[name='commit_summary']").Attr("placeholder")
|
||||
assert.True(t, ok)
|
||||
assert.EqualValues(t, `Add "<filename>"`, placeholder)
|
||||
assert.Equal(t, `Add "<filename>"`, placeholder)
|
||||
}
|
||||
|
||||
func TestCommitMail(t *testing.T) {
|
||||
|
@ -188,7 +188,7 @@ func TestCommitMail(t *testing.T) {
|
|||
assert.False(t, inactivatedMail.IsActivated)
|
||||
|
||||
otherEmail := unittest.AssertExistsAndLoadBean(t, &user_model.EmailAddress{ID: 1, IsActivated: true})
|
||||
assert.NotEqualValues(t, otherEmail.UID, user.ID)
|
||||
assert.NotEqual(t, otherEmail.UID, user.ID)
|
||||
|
||||
primaryEmail := unittest.AssertExistsAndLoadBean(t, &user_model.EmailAddress{ID: 3, UID: user.ID, IsActivated: true})
|
||||
|
||||
|
@ -277,16 +277,16 @@ func TestCommitMail(t *testing.T) {
|
|||
session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
if !case2.skipLastCommit {
|
||||
newlastCommit, _ := lastCommitAndCSRF(t, case1.link, false)
|
||||
assert.NotEqualValues(t, newlastCommit, lastCommit)
|
||||
assert.NotEqual(t, newlastCommit, lastCommit)
|
||||
}
|
||||
|
||||
commit, err := gitRepo.GetCommitByPath(case1.fileName)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.EqualValues(t, "user2", commit.Author.Name)
|
||||
assert.EqualValues(t, "user2@noreply.example.org", commit.Author.Email)
|
||||
assert.EqualValues(t, "user2", commit.Committer.Name)
|
||||
assert.EqualValues(t, "user2@noreply.example.org", commit.Committer.Email)
|
||||
assert.Equal(t, "user2", commit.Author.Name)
|
||||
assert.Equal(t, "user2@noreply.example.org", commit.Author.Email)
|
||||
assert.Equal(t, "user2", commit.Committer.Name)
|
||||
assert.Equal(t, "user2@noreply.example.org", commit.Committer.Email)
|
||||
})
|
||||
|
||||
t.Run("Normal", func(t *testing.T) {
|
||||
|
@ -302,16 +302,16 @@ func TestCommitMail(t *testing.T) {
|
|||
session.MakeRequest(t, req, http.StatusSeeOther)
|
||||
if !case2.skipLastCommit {
|
||||
newlastCommit, _ := lastCommitAndCSRF(t, case2.link, false)
|
||||
assert.NotEqualValues(t, newlastCommit, lastCommit)
|
||||
assert.NotEqual(t, newlastCommit, lastCommit)
|
||||
}
|
||||
|
||||
commit, err := gitRepo.GetCommitByPath(case2.fileName)
|
||||
require.NoError(t, err)
|
||||
|
||||
assert.EqualValues(t, "user2", commit.Author.Name)
|
||||
assert.EqualValues(t, primaryEmail.Email, commit.Author.Email)
|
||||
assert.EqualValues(t, "user2", commit.Committer.Name)
|
||||
assert.EqualValues(t, primaryEmail.Email, commit.Committer.Email)
|
||||
assert.Equal(t, "user2", commit.Author.Name)
|
||||
assert.Equal(t, primaryEmail.Email, commit.Author.Email)
|
||||
assert.Equal(t, "user2", commit.Committer.Name)
|
||||
assert.Equal(t, primaryEmail.Email, commit.Committer.Email)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue