aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-24 16:02:50 +0900
committerOphestra <cat@gensokyo.uk>2026-01-24 16:02:50 +0900
commit6956dfc31ae014c0bdeedf5d3f20963b99abcddb (patch)
treebccb5a9ee9782a16fec3f0530e1035ef3adf1c9d /internal/pkg/pkg_test.go
parentd9ebaf20f8e71f043d2387a42d273dadc5d536b5 (diff)
internal/pkg: block on implementation entry
This avoids blocking while not in Cure method of the implementation. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/pkg_test.go')
-rw-r--r--internal/pkg/pkg_test.go6
1 files changed, 5 insertions, 1 deletions
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}),