diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-11 17:46:04 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-11 17:46:04 +0900 |
| commit | 7ccc2fc5ece9c6236c02585ef4048fdc2b4a5b51 (patch) | |
| tree | 3e63ab8aeb380b256cc36c42c5ca4c1cac8de728 /internal/pkg/exec_test.go | |
| parent | 63e137856e47bb9cb472fc58ee6ea0b2e6c666b8 (diff) | |
internal/pkg: exec with specific timeout
This change also updates the documentation of NewExec.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec_test.go')
| -rw-r--r-- | internal/pkg/exec_test.go | 16 |
1 files changed, 8 insertions, 8 deletions
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"), |
