diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-07 22:15:55 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-07 22:16:26 +0900 |
| commit | c86ff02d8d794ef31d8f646ae85e776b714c7ef9 (patch) | |
| tree | 6c8fce143e3c0b22d094b8f9c73bacb92c4d1f0d /internal/pkg/exec_test.go | |
| parent | e8dda70c417a78647ae31930acc0a98ecf5ad097 (diff) | |
internal/pkg: tar optional file
This allows tar to take a single-file directory Artifact as input.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec_test.go')
| -rw-r--r-- | internal/pkg/exec_test.go | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go index 680f0ce1..17172ea2 100644 --- a/internal/pkg/exec_test.go +++ b/internal/pkg/exec_test.go @@ -300,26 +300,6 @@ func newTesttool() ( ).String(), testtoolBin, 0500) }, }} - testtoolDestroy = func(t *testing.T, base *check.Absolute, c *pkg.Cache) { - if pathname, checksum, err := c.Cure(testtool); err != nil { - t.Fatalf("Cure: error = %v", err) - } else if err = os.Remove(pathname.String()); err != nil { - t.Fatal(err) - } else { - p := base.Append( - "checksum", - pkg.Encode(checksum), - ) - if err = os.Chmod(p.Append("bin").String(), 0700); err != nil { - t.Fatal(err) - } - if err = os.Chmod(p.String(), 0700); err != nil { - t.Fatal(err) - } - if err = os.RemoveAll(p.String()); err != nil { - t.Fatal(err) - } - } - } + testtoolDestroy = newDestroyArtifactFunc(testtool) return } |
