clean brittle tests (#9)
build-binaries / build-binaries (push) Successful in 2m7s
test-image / build-image (push) Successful in 43s
test / test (push) Successful in 1m26s

Reviewed-on: #9
Reviewed-by: xtul <mpiasecki720@protonmail.com>
Co-authored-by: vickydotbat <vickydotbat@tutamail.com>
Co-committed-by: vickydotbat <vickydotbat@tutamail.com>
This commit was merged in pull request #9.
This commit is contained in:
2026-06-20 10:32:20 +00:00
committed by archvillainette
parent f1fd03ee83
commit 13c8ced5e8
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
}