From 8cb776dcac4aca7bde86ff3ea2aa787af56da44d Mon Sep 17 00:00:00 2001 From: Mathieu Fenniak Date: Thu, 16 Apr 2026 02:08:43 +0200 Subject: [PATCH] chore: fix TestMirrorPull on older git (2.34.1) installation (#12134) `TestMirrorPull` is currently failing when run on git 2.34.1 in the `testing-integration.yml` workflow: https://codeberg.org/forgejo-integration/forgejo/actions/runs/16661/jobs/1/attempt/1#jobstep-5-2539 Began to fail after #11909 when additional checks on pull mirror configuration was added. This PR addresses the issue and has been manually tested against the same git version: ``` $ git --version git version 2.34.1 $ make test-sqlite#TestMirrorPull 2>&1 ... === TestMirrorPull/migrate_from_repo_config_credentials (tests/integration/mirror_pull_test.go:238) PASS ``` ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. All work and communication must conform to Forgejo's [AI Agreement](https://codeberg.org/forgejo/governance/src/branch/main/AIAgreement.md). There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change. - [x] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12134 Reviewed-by: Michael Kriese Reviewed-by: Beowulf Co-authored-by: Mathieu Fenniak Co-committed-by: Mathieu Fenniak --- tests/integration/mirror_pull_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/mirror_pull_test.go b/tests/integration/mirror_pull_test.go index a0de586aaa..9a520ae5a5 100644 --- a/tests/integration/mirror_pull_test.go +++ b/tests/integration/mirror_pull_test.go @@ -492,7 +492,7 @@ func waitForPullMirror(t *testing.T, mirrorName, expectedSha string) { } func getGitConfig(t *testing.T, configFile, configPath string) string { - stdout, stderr, err := process.GetManager().Exec("getGitConfig", "git", "config", "get", "--file", configFile, configPath) + stdout, stderr, err := process.GetManager().Exec("getGitConfig", "git", "config", "--get", "--file", configFile, configPath) require.NoError(t, err, "fetch config %s failed: git stderr: %s", configPath, stderr) return strings.TrimSpace(stdout) }