From 32f990eca1e2a8aa3ffbf0d7a1258fab877b5ca4 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Fri, 10 Oct 2025 20:23:41 +0200 Subject: [PATCH] [v12.0/forgejo] chore: TestParseGitURLs must use a valid IPv6 address (#9623) **Backport: https://codeberg.org/forgejo/forgejo/pulls/8908** Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8908 Reviewed-by: Gusted Co-authored-by: Renovate Bot Co-committed-by: Renovate Bot (cherry picked from commit 94c068e91ed2b7e429aee3b7007eabbae3e77412) ``` Conflicts: go.mod only the IPv6 fix part is needed ``` Co-authored-by: Renovate Bot Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9623 Reviewed-by: Gusted --- Makefile | 2 +- modules/git/url/url_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e770f2a989..858426c168 100644 --- a/Makefile +++ b/Makefile @@ -499,7 +499,7 @@ lint-disposable-emails-fix: .PHONY: security-check security-check: - go run $(GOVULNCHECK_PACKAGE) -show color ./... + $(GO) run $(GOVULNCHECK_PACKAGE) -show color ./... ### # Development and testing targets diff --git a/modules/git/url/url_test.go b/modules/git/url/url_test.go index 54655633bf..68ad8bd7c5 100644 --- a/modules/git/url/url_test.go +++ b/modules/git/url/url_test.go @@ -29,12 +29,12 @@ func TestParseGitURLs(t *testing.T) { }, }, { - kase: "git@[fe80:14fc:cec5:c174:d88%2510]:go-gitea/gitea.git", + kase: "git@[fe80::14fc:cec5:c174:d88%2510]:go-gitea/gitea.git", expected: &GitURL{ URL: &url.URL{ Scheme: "ssh", User: url.User("git"), - Host: "[fe80:14fc:cec5:c174:d88%10]", + Host: "[fe80::14fc:cec5:c174:d88%10]", Path: "go-gitea/gitea.git", }, extraMark: 1, @@ -132,11 +132,11 @@ func TestParseGitURLs(t *testing.T) { }, }, { - kase: "https://[fe80:14fc:cec5:c174:d88%2510]:20/go-gitea/gitea.git", + kase: "https://[fe80::14fc:cec5:c174:d88%2510]:20/go-gitea/gitea.git", expected: &GitURL{ URL: &url.URL{ Scheme: "https", - Host: "[fe80:14fc:cec5:c174:d88%10]:20", + Host: "[fe80::14fc:cec5:c174:d88%10]:20", Path: "/go-gitea/gitea.git", }, extraMark: 0,