diff --git a/modules/git/git_test.go b/modules/git/git_test.go index 1f9060247f..01200dba68 100644 --- a/modules/git/git_test.go +++ b/modules/git/git_test.go @@ -105,6 +105,10 @@ func TestSyncConfigGPGFormat(t *testing.T) { }) t.Run("SSH format", func(t *testing.T) { + if CheckGitVersionAtLeast("2.34.0") != nil { + t.SkipNow() + } + r, err := os.OpenRoot(t.TempDir()) require.NoError(t, err) f, err := r.OpenFile("ssh-keygen", os.O_CREATE|os.O_TRUNC, 0o700) diff --git a/tests/integration/git_push_test.go b/tests/integration/git_push_test.go index bd7a464354..22dd127a4c 100644 --- a/tests/integration/git_push_test.go +++ b/tests/integration/git_push_test.go @@ -27,6 +27,10 @@ import ( func forEachObjectFormat(t *testing.T, f func(t *testing.T, objectFormat git.ObjectFormat)) { for _, objectFormat := range []git.ObjectFormat{git.Sha256ObjectFormat, git.Sha1ObjectFormat} { + if !git.SupportHashSha256 && objectFormat == git.Sha256ObjectFormat { + continue + } + t.Run(objectFormat.Name(), func(t *testing.T) { f(t, objectFormat) })