mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-28 09:44:53 -04:00
chore: skip sha256 repo for older git versions (#11542)
- Breaks testing on git versions that don't have SHA256 support. https://codeberg.org/forgejo-integration/forgejo/actions/runs/16172/jobs/1/attempt/1#jobstep-5-2381 ``` // TestLinksLogin "2026/03/06 06:15:20 ...ices/context/repo.go:1007:28() [E] GetBranchCommit: length 64 has no matched object format: 473a0f4c3be8a93681a267e3b1e9a7dcda1185436fe141f7749120a303721813", ``` Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11542 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-committed-by: Gusted <postmaster@gusted.xyz>
This commit is contained in:
parent
eef3111cc7
commit
e3b219ee98
1 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"path"
|
||||
"testing"
|
||||
|
||||
"forgejo.org/modules/git"
|
||||
"forgejo.org/modules/setting"
|
||||
api "forgejo.org/modules/structs"
|
||||
"forgejo.org/modules/test"
|
||||
|
|
@ -161,6 +162,10 @@ func testLinksAsUser(userName string, t *testing.T) {
|
|||
}
|
||||
|
||||
for _, repo := range apiRepos {
|
||||
if repo.ObjectFormatName == "sha256" && !git.SupportHashSha256 {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, link := range repoLinks {
|
||||
req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s%s", userName, repo.Name, link))
|
||||
session.MakeRequest(t, req, http.StatusOK)
|
||||
|
|
|
|||
Loading…
Reference in a new issue