diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-05-12 15:10:43 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-05-12 15:11:17 +0900 |
| commit | 6643cfbeee181ee1bd543e2b3783bb5a8c01ad13 (patch) | |
| tree | 04b1b3b1d3fa044a1f8d5097355fa2779fe95af9 /internal/pkg/exec_test.go | |
| parent | dcde38f2e967ebf14a3c8a7f933b7dd1bf465566 (diff) | |
internal/pkg: optionally measure exec artifact
Useful for verifying deterministic output without enabling network access.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/exec_test.go')
| -rw-r--r-- | internal/pkg/exec_test.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go index 6e436cae..f9d4158e 100644 --- a/internal/pkg/exec_test.go +++ b/internal/pkg/exec_test.go @@ -57,7 +57,7 @@ func TestExec(t *testing.T) { cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-offline", "", nil, 0, false, + "exec-offline", "", new(wantOffline.hash()), 0, false, false, pkg.AbsWork, []string{"HAKUREI_TEST=1"}, check.MustAbs("/opt/bin/testtool"), @@ -80,7 +80,7 @@ func TestExec(t *testing.T) { ), ignorePathname, wantOffline, nil}, {"error passthrough", pkg.NewExec( - "", "", nil, 0, true, + "", "", nil, 0, false, true, pkg.AbsWork, []string{"HAKUREI_TEST=1"}, check.MustAbs("/opt/bin/testtool"), @@ -103,7 +103,7 @@ func TestExec(t *testing.T) { }}, {"invalid paths", pkg.NewExec( - "", "", nil, 0, false, + "", "", nil, 0, false, false, pkg.AbsWork, []string{"HAKUREI_TEST=1"}, check.MustAbs("/opt/bin/testtool"), @@ -116,7 +116,7 @@ func TestExec(t *testing.T) { // check init failure passthrough var exitError *exec.ExitError if _, _, err := c.Cure(pkg.NewExec( - "", "", nil, 0, false, + "", "", nil, 0, false, false, pkg.AbsWork, nil, check.MustAbs("/opt/bin/testtool"), @@ -157,7 +157,7 @@ func TestExec(t *testing.T) { } cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-net", "", new(wantNet.hash()), 0, false, + "exec-net", "", new(wantNet.hash()), 0, true, false, pkg.AbsWork, []string{"HAKUREI_TEST=1"}, check.MustAbs("/opt/bin/testtool"), @@ -206,7 +206,7 @@ func TestExec(t *testing.T) { cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-overlay-root", "", nil, 0, false, + "exec-overlay-root", "", nil, 0, false, false, pkg.AbsWork, []string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"}, check.MustAbs("/opt/bin/testtool"), @@ -247,7 +247,7 @@ func TestExec(t *testing.T) { cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-overlay-work", "", nil, 0, false, + "exec-overlay-work", "", nil, 0, false, false, pkg.AbsWork, []string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"}, check.MustAbs("/work/bin/testtool"), @@ -293,7 +293,7 @@ func TestExec(t *testing.T) { cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-multiple-layers", "", nil, 0, false, + "exec-multiple-layers", "", nil, 0, false, false, pkg.AbsWork, []string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"}, check.MustAbs("/opt/bin/testtool"), @@ -366,7 +366,7 @@ func TestExec(t *testing.T) { cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-layer-promotion", "", nil, 0, true, + "exec-layer-promotion", "", nil, 0, false, true, pkg.AbsWork, []string{"HAKUREI_TEST=1", "HAKUREI_ROOT=1"}, check.MustAbs("/opt/bin/testtool"), @@ -416,7 +416,7 @@ func TestExec(t *testing.T) { cureMany(t, c, []cureStep{ {"container", pkg.NewExec( - "exec-binfmt", "cafe", nil, 0, true, + "exec-binfmt", "cafe", nil, 0, false, true, pkg.AbsWork, []string{"HAKUREI_TEST=1", "HAKUREI_BINFMT=1"}, check.MustAbs("/opt/bin/sample"), |
