diff options
| author | 2026-03-07 18:09:20 +0800 | |
|---|---|---|
| committer | 2026-03-07 18:17:54 +0800 | |
| commit | e667c3c52a535ee67fe895bb0240fbad6e920087 (patch) | |
| tree | 0815f7cc9b2c4a06d00722bce4c3ac57c515288b /refstore/files/helpers_test.go | |
| parent | receivepack: Connect protocol with service (diff) | |
| signature | No signature | |
refstore/files: Accept timeout instead of reading from config
And split things up again.
Diffstat (limited to 'refstore/files/helpers_test.go')
| -rw-r--r-- | refstore/files/helpers_test.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/refstore/files/helpers_test.go b/refstore/files/helpers_test.go index 2a0eca74..bdef6bb5 100644 --- a/refstore/files/helpers_test.go +++ b/refstore/files/helpers_test.go @@ -5,18 +5,21 @@ import ( "slices" "strings" "testing" + "time" "codeberg.org/lindenii/furgit/internal/testgit" "codeberg.org/lindenii/furgit/objectid" "codeberg.org/lindenii/furgit/refstore/files" ) +const testPackedRefsTimeout = time.Second + func openFilesStore(t *testing.T, testRepo *testgit.TestRepo, algo objectid.Algorithm) *files.Store { t.Helper() root := testRepo.OpenGitRoot(t) - store, err := files.New(root, algo) + store, err := files.New(root, algo, testPackedRefsTimeout) if err != nil { t.Fatalf("files.New: %v", err) } @@ -27,7 +30,7 @@ func openFilesStore(t *testing.T, testRepo *testgit.TestRepo, algo objectid.Algo func openFilesStoreAt(t *testing.T, root *os.Root, algo objectid.Algorithm) *files.Store { t.Helper() - store, err := files.New(root, algo) + store, err := files.New(root, algo, testPackedRefsTimeout) if err != nil { t.Fatalf("files.New: %v", err) } |
