From 902829d4dbce6c9c23267cd5ff8f7cb35ee8c880 Mon Sep 17 00:00:00 2001 From: DmitryFrolovTri <23313323+DmitryFrolovTri@users.noreply.github.com> Date: Thu, 22 Jan 2026 12:59:46 +0000 Subject: [PATCH] Fix LFS tests, git-lfs not initialized/installed --- tests/integration/size_limit_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/integration/size_limit_test.go b/tests/integration/size_limit_test.go index 8f4fbb0ddf..30adbd65d5 100644 --- a/tests/integration/size_limit_test.go +++ b/tests/integration/size_limit_test.go @@ -163,7 +163,10 @@ func testLFSSizeLimitInternal(t *testing.T, u *url.URL) { // Helper to track LFS setupLFS := func(t *testing.T, dstPath string) { - err := os.WriteFile(path.Join(dstPath, ".gitattributes"), []byte("*.dat filter=lfs diff=lfs merge=lfs -text\n"), 0o644) + // Initialize git-lfs in the repository + err := gitcmd.NewCommand("lfs", "install", "--local").WithDir(dstPath).Run(t.Context()) + assert.NoError(t, err) + err = os.WriteFile(path.Join(dstPath, ".gitattributes"), []byte("*.dat filter=lfs diff=lfs merge=lfs -text\n"), 0o644) assert.NoError(t, err) err = gitcmd.NewCommand("add", ".gitattributes").WithDir(dstPath).Run(t.Context()) assert.NoError(t, err)