mirror of
https://gitea.com/gitea/tea.git
synced 2026-07-31 19:46:35 +00:00
fix(test): disable gpg signing in worktree test repo (#1072)
Fixes #1071 `TestRepoFromPath_Worktree` creates a throwaway temp repo and commits to it. On machines with `commit.gpgsign=true` in global git config, the commit fails with `No secret key`. Override the global setting by setting `commit.gpgsign=false` in the temp repo's local config so the test is environment-independent. Reviewed-on: https://gitea.com/gitea/tea/pulls/1072 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Ross Golder <ross@golder.org>
This commit is contained in:
@@ -29,6 +29,8 @@ func TestRepoFromPath_Worktree(t *testing.T) {
|
||||
assert.NoError(t, cmd.Run())
|
||||
cmd = exec.Command("git", "-C", mainRepoPath, "config", "user.name", "Test User")
|
||||
assert.NoError(t, cmd.Run())
|
||||
cmd = exec.Command("git", "-C", mainRepoPath, "config", "commit.gpgsign", "false")
|
||||
assert.NoError(t, cmd.Run())
|
||||
|
||||
cmd = exec.Command("git", "-C", mainRepoPath, "remote", "add", "origin", "https://gitea.com/owner/repo.git")
|
||||
assert.NoError(t, cmd.Run())
|
||||
|
||||
Reference in New Issue
Block a user