aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/tar_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-09 01:51:39 +0900
committerOphestra <cat@gensokyo.uk>2026-01-09 05:20:34 +0900
commitf7124667145d1f7c614d9fc644bc07bb6174454a (patch)
tree9585573da6d016a27ce7fd066b795f611d1ce877 /internal/pkg/tar_test.go
parentf2430b5f5ef7ac0361d1c4976b7ec7bebaa15f63 (diff)
internal/pkg: move dependency flooding to cache
This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/tar_test.go')
-rw-r--r--internal/pkg/tar_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/pkg/tar_test.go b/internal/pkg/tar_test.go
index 6c22d316..b292ab82 100644
--- a/internal/pkg/tar_test.go
+++ b/internal/pkg/tar_test.go
@@ -121,8 +121,8 @@ func checkTarHTTP(
tarDir := stubArtifact{
kind: pkg.KindExec,
params: []byte("directory containing a single regular file"),
- cure: func(c *pkg.CureContext) error {
- work := c.GetWorkDir()
+ cure: func(t *pkg.TContext) error {
+ work := t.GetWorkDir()
if err := os.MkdirAll(work.String(), 0700); err != nil {
return err
}
@@ -136,8 +136,8 @@ func checkTarHTTP(
tarDirMulti := stubArtifact{
kind: pkg.KindExec,
params: []byte("directory containing a multiple entries"),
- cure: func(c *pkg.CureContext) error {
- work := c.GetWorkDir()
+ cure: func(t *pkg.TContext) error {
+ work := t.GetWorkDir()
if err := os.MkdirAll(work.Append(
"garbage",
).String(), 0700); err != nil {
@@ -153,8 +153,8 @@ func checkTarHTTP(
tarDirType := stubArtifact{
kind: pkg.KindExec,
params: []byte("directory containing a symbolic link"),
- cure: func(c *pkg.CureContext) error {
- work := c.GetWorkDir()
+ cure: func(t *pkg.TContext) error {
+ work := t.GetWorkDir()
if err := os.MkdirAll(work.String(), 0700); err != nil {
return err
}
@@ -197,7 +197,7 @@ func checkTarHTTP(
{"error passthrough", pkg.NewTar(stubArtifact{
kind: pkg.KindExec,
params: []byte("doomed artifact"),
- cure: func(c *pkg.CureContext) error {
+ cure: func(t *pkg.TContext) error {
return stub.UniqueError(0xcafe)
},
}, pkg.TarGzip), nil, pkg.Checksum{}, stub.UniqueError(0xcafe)},