From 6956dfc31ae014c0bdeedf5d3f20963b99abcddb Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sat, 24 Jan 2026 16:02:50 +0900 Subject: internal/pkg: block on implementation entry This avoids blocking while not in Cure method of the implementation. Signed-off-by: Ophestra --- internal/pkg/pkg_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'internal/pkg/pkg_test.go') diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index 727a6c36..2581cce7 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -283,7 +283,7 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) { msg.SwapVerbose(testing.Verbose()) var scrubFunc func() error // scrub after hashing - if c, err := pkg.Open(t.Context(), msg, 0, base); err != nil { + if c, err := pkg.Open(t.Context(), msg, 1<<4, base); err != nil { t.Fatalf("Open: error = %v", err) } else { t.Cleanup(c.Close) @@ -561,6 +561,10 @@ func TestCache(t *testing.T) { stub.UniqueError }{UniqueError: 0xbad}, )}, + + cure: func(f *pkg.FContext) error { + panic("attempting to cure impossible artifact") + }, }, nil, pkg.Checksum{}, &pkg.DependencyCureError{ { Ident: unique.Make(pkg.ID{0xff, 3}), -- cgit v1.3.1