forked from security/hakurei
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>
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user