aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/exec_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-17 14:16:29 +0900
committerOphestra <cat@gensokyo.uk>2026-01-17 14:41:00 +0900
commitefc90c3221f42562a9758b0bbdabf30cc95b8f7b (patch)
treeb9a85a44c85fcb11af5dd1440137558b11837e14 /internal/pkg/exec_test.go
parent610ee13ab395768ff5f2dfaff899fb3ba2a5a514 (diff)
internal/pkg: deduplicate dependency errors
This significantly simplifies error reporting for caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec_test.go')
-rw-r--r--internal/pkg/exec_test.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go
index 558ab39b..b2fad602 100644
--- a/internal/pkg/exec_test.go
+++ b/internal/pkg/exec_test.go
@@ -11,6 +11,7 @@ import (
"os/exec"
"slices"
"testing"
+ "unique"
"hakurei.app/container/check"
"hakurei.app/container/stub"
@@ -74,7 +75,14 @@ func TestExec(t *testing.T) {
return stub.UniqueError(0xcafe)
},
}),
- ), nil, pkg.Checksum{}, errors.Join(stub.UniqueError(0xcafe))},
+ ), nil, pkg.Checksum{}, &pkg.DependencyCureError{
+ {
+ Ident: unique.Make(pkg.ID(pkg.MustDecode(
+ "CWEoJqnSBpWf8uryC2qnIe3O1a_FZWUWZGbiVPsQFGW7pvDHiSwoK3QCU9-uxN87",
+ ))),
+ Err: stub.UniqueError(0xcafe),
+ },
+ }},
{"invalid paths", pkg.NewExec(
"", nil, 0,