clean brittle tests
build-binaries / build-binaries (pull_request) Successful in 2m8s
test-image / build-image (pull_request) Successful in 47s
test / test (pull_request) Successful in 1m24s

This commit is contained in:
2026-06-20 12:11:43 +02:00
parent f1fd03ee83
commit ecf8a916a0
8 changed files with 145 additions and 194 deletions
+2 -2
View File
@@ -3086,7 +3086,7 @@ func TestCollectLFSAssetInfoUsesGitCommonDirForWorktree(t *testing.T) {
func runGitCommitTest(t *testing.T, dir, timestamp, message string) {
t.Helper()
runGitTest(t, dir, "add", ".")
cmd := exec.Command("git", "commit", "-m", message)
cmd := exec.Command("git", "-c", "commit.gpgsign=false", "-c", "tag.gpgsign=false", "commit", "-m", message)
cmd.Dir = dir
cmd.Env = append(os.Environ(),
"GIT_AUTHOR_DATE="+timestamp,
@@ -3100,7 +3100,7 @@ func runGitCommitTest(t *testing.T, dir, timestamp, message string) {
func runGitTest(t *testing.T, dir string, args ...string) {
t.Helper()
cmd := exec.Command("git", args...)
cmd := exec.Command("git", append([]string{"-c", "commit.gpgsign=false", "-c", "tag.gpgsign=false"}, args...)...)
if dir != "" {
cmd.Dir = dir
}