From 7ccc2fc5ece9c6236c02585ef4048fdc2b4a5b51 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 11 Jan 2026 17:46:04 +0900 Subject: internal/pkg: exec with specific timeout This change also updates the documentation of NewExec. Signed-off-by: Ophestra --- internal/pkg/exec_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'internal/pkg/exec_test.go') diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go index 22e0e2f0..b422da39 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, + 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, + 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, + 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, + 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, + &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, + 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, + 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, + nil, 0, pkg.AbsWork, []string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"}, check.MustAbs("/opt/bin/testtool"), -- cgit v1.3.1