aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/exec_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-12 04:17:47 +0900
committerOphestra <cat@gensokyo.uk>2026-01-12 04:17:47 +0900
commit29951c51749f1c3f5ca96488bff6eee247c03dc7 (patch)
tree12a482e08fa4449addcb50da302a5c824e9dbf60 /internal/pkg/exec_test.go
parent91c3594dee2f1689501997d395af7019df8bebe2 (diff)
internal/pkg: caller-supplied reporting name for exec
This does not have a reasonable way of inferring the underlying name. For zero value it falls back to base of executable pathname. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec_test.go')
-rw-r--r--internal/pkg/exec_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go
index b422da39..97f72a38 100644
--- a/internal/pkg/exec_test.go
+++ b/internal/pkg/exec_test.go
@@ -38,7 +38,7 @@ func TestExec(t *testing.T) {
cureMany(t, c, []cureStep{
{"container", pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1"},
check.MustAbs("/opt/bin/testtool"),
@@ -61,7 +61,7 @@ func TestExec(t *testing.T) {
), ignorePathname, wantChecksumOffline, nil},
{"error passthrough", pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1"},
check.MustAbs("/opt/bin/testtool"),
@@ -77,7 +77,7 @@ func TestExec(t *testing.T) {
), nil, pkg.Checksum{}, errors.Join(stub.UniqueError(0xcafe))},
{"invalid paths", pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1"},
check.MustAbs("/opt/bin/testtool"),
@@ -90,7 +90,7 @@ func TestExec(t *testing.T) {
// check init failure passthrough
var exitError *exec.ExitError
if _, _, err := c.Cure(pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
nil,
check.MustAbs("/opt/bin/testtool"),
@@ -112,7 +112,7 @@ func TestExec(t *testing.T) {
)
cureMany(t, c, []cureStep{
{"container", pkg.NewExec(
- &wantChecksum, 0,
+ "", &wantChecksum, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1"},
check.MustAbs("/opt/bin/testtool"),
@@ -144,7 +144,7 @@ func TestExec(t *testing.T) {
cureMany(t, c, []cureStep{
{"container", pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"},
check.MustAbs("/opt/bin/testtool"),
@@ -170,7 +170,7 @@ func TestExec(t *testing.T) {
cureMany(t, c, []cureStep{
{"container", pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"},
check.MustAbs("/work/bin/testtool"),
@@ -201,7 +201,7 @@ func TestExec(t *testing.T) {
cureMany(t, c, []cureStep{
{"container", pkg.NewExec(
- nil, 0,
+ "", nil, 0,
pkg.AbsWork,
[]string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"},
check.MustAbs("/opt/bin/testtool"),