aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/dir_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-16 02:09:12 +0900
committerOphestra <cat@gensokyo.uk>2026-01-16 02:47:59 +0900
commit5936e6a4aab541a437fa9464468b51f91d019a2a (patch)
tree1aa362806b3f5a0522ee82c2f0b27c0a655476db /internal/pkg/dir_test.go
parent3499a82785f8cb82bfe528875391d76d5e03c3de (diff)
internal/pkg: parallelise scrub
This significantly improves scrubbing performance. Since the cache directory structure is friendly to simultaneous access, this is possible without synchronisation. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/dir_test.go')
-rw-r--r--internal/pkg/dir_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/pkg/dir_test.go b/internal/pkg/dir_test.go
index c6a57e49..9ded5bfc 100644
--- a/internal/pkg/dir_test.go
+++ b/internal/pkg/dir_test.go
@@ -523,7 +523,8 @@ func TestFlatten(t *testing.T) {
t.Run("hash", func(t *testing.T) {
t.Parallel()
- if got, err := pkg.HashFS(tc.fsys, "."); err != nil {
+ var got pkg.Checksum
+ if err := pkg.HashFS(&got, tc.fsys, "."); err != nil {
t.Fatalf("HashFS: error = %v", err)
} else if got != tc.sum {
t.Fatalf("HashFS: %v", &pkg.ChecksumMismatchError{