internal/pkg: deduplicate dependency errors
All checks were successful
Test / Create distribution (push) Successful in 29s
Test / Sandbox (push) Successful in 1m51s
Test / Sandbox (race detector) (push) Successful in 2m44s
Test / ShareFS (push) Successful in 3m42s
Test / Hpkg (push) Successful in 4m19s
Test / Hakurei (push) Successful in 4m43s
Test / Hakurei (race detector) (push) Successful in 5m18s
Test / Flake checks (push) Successful in 2m44s
All checks were successful
Test / Create distribution (push) Successful in 29s
Test / Sandbox (push) Successful in 1m51s
Test / Sandbox (race detector) (push) Successful in 2m44s
Test / ShareFS (push) Successful in 3m42s
Test / Hpkg (push) Successful in 4m19s
Test / Hakurei (push) Successful in 4m43s
Test / Hakurei (race detector) (push) Successful in 5m18s
Test / Flake checks (push) Successful in 2m44s
This significantly simplifies error reporting for caller. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user