diff options
Diffstat (limited to 'internal/pkg/exec_test.go')
| -rw-r--r-- | internal/pkg/exec_test.go | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go index f9d4158e..cab7a9ca 100644 --- a/internal/pkg/exec_test.go +++ b/internal/pkg/exec_test.go @@ -11,7 +11,6 @@ import ( "path/filepath" "slices" "testing" - "unique" "hakurei.app/check" "hakurei.app/container" @@ -50,6 +49,13 @@ func TestExec(t *testing.T) { "check": {Mode: 0400, Data: []byte{0}}, } wantOfflineEncode := pkg.Encode(wantOffline.hash()) + failingArtifact := &stubArtifact{ + kind: pkg.KindTar, + params: []byte("doomed artifact"), + cure: func(t *pkg.TContext) error { + return stub.UniqueError(0xcafe) + }, + } checkWithCache(t, []cacheTestCase{ {"offline", pkg.CValidateKnown | checkDestroySubstitutes, nil, func(t *testing.T, base *check.Absolute, c *pkg.Cache) { @@ -86,18 +92,10 @@ func TestExec(t *testing.T) { check.MustAbs("/opt/bin/testtool"), []string{"testtool"}, - pkg.MustPath("/proc/nonexistent", false, &stubArtifact{ - kind: pkg.KindTar, - params: []byte("doomed artifact"), - cure: func(t *pkg.TContext) error { - return stub.UniqueError(0xcafe) - }, - }), + pkg.MustPath("/proc/nonexistent", false, failingArtifact), ), nil, nil, &pkg.DependencyCureError{ { - Ident: unique.Make(pkg.ID(pkg.MustDecode( - "Sowo6oZRmG6xVtUaxB6bDWZhVsqAJsIJWUp0OPKlE103cY0lodx7dem8J-qQF0Z1", - ))), + A: failingArtifact, Err: stub.UniqueError(0xcafe), }, }}, |
