From 3c6e9b3d0526a9338dc897a8e288647b2ec12b10 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 8 Jul 2026 14:19:17 +0900 Subject: internal/pkg: expose cure whence Useful for cure determinism validation of KindExec. Signed-off-by: Ophestra --- internal/pkg/exec_test.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'internal/pkg/exec_test.go') diff --git a/internal/pkg/exec_test.go b/internal/pkg/exec_test.go index b638d4df..884074f4 100644 --- a/internal/pkg/exec_test.go +++ b/internal/pkg/exec_test.go @@ -84,7 +84,7 @@ func TestExec(t *testing.T) { }, }), pkg.MustPath("/opt", false, testtool), - ), ignorePathname, wantOffline, nil}, + ), ignorePathname, wantOffline, pkg.WNew, nil}, {"substitution", pkg.NewExec( "exec-offline", "", new(wantOffline.hash()), 0, false, false, @@ -108,7 +108,7 @@ func TestExec(t *testing.T) { }, }), pkg.MustPath("/opt", false, testtool), - ), ignorePathname, wantOffline, nil}, + ), ignorePathname, wantOffline, pkg.WSubstitute, nil}, {"error passthrough", pkg.NewExec( "", "", nil, 0, false, true, @@ -118,7 +118,7 @@ func TestExec(t *testing.T) { []string{"testtool"}, pkg.MustPath("/proc/nonexistent", false, failingArtifact), - ), nil, nil, &pkg.DependencyCureError{ + ), nil, nil, pkg.WNew, &pkg.DependencyCureError{ { A: failingArtifact, Err: stub.UniqueError(0xcafe), @@ -133,7 +133,7 @@ func TestExec(t *testing.T) { []string{"testtool"}, pkg.ExecPath{}, - ), nil, nil, pkg.ErrInvalidPaths}, + ), nil, nil, pkg.WNew, pkg.ErrInvalidPaths}, }) // check init failure passthrough @@ -225,7 +225,7 @@ func TestExec(t *testing.T) { }, }), pkg.MustPath("/opt", false, testtool), - ), ignorePathname, wantNet, nil}, + ), ignorePathname, wantNet, pkg.WNew, nil}, }) destroyStatus(t, base, 2, 0) @@ -269,7 +269,7 @@ func TestExec(t *testing.T) { }, }), pkg.MustPath("/opt", false, testtool), - ), ignorePathname, wantOffline, nil}, + ), ignorePathname, wantOffline, pkg.WNew, nil}, }) destroyStatus(t, base, 2, 0) @@ -316,7 +316,7 @@ func TestExec(t *testing.T) { return os.MkdirAll(t.GetWorkDir().String(), 0700) }, }), pkg.Path(pkg.AbsWork, false /* ignored */, testtool), - ), ignorePathname, wantOffline, nil}, + ), ignorePathname, wantOffline, pkg.WNew, nil}, }) destroyStatus(t, base, 2, 0) @@ -385,7 +385,7 @@ func TestExec(t *testing.T) { }, }), pkg.MustPath("/opt", false, testtool), - ), ignorePathname, wantOffline, nil}, + ), ignorePathname, wantOffline, pkg.WNew, nil}, }) destroyStatus(t, base, 2, 0) @@ -438,7 +438,7 @@ func TestExec(t *testing.T) { }, }), pkg.MustPath("/opt", false, testtool), - ), ignorePathname, wantOffline, nil}, + ), ignorePathname, wantOffline, pkg.WNew, nil}, }) destroyStatus(t, base, 2, 0) @@ -503,7 +503,7 @@ func TestExec(t *testing.T) { ".": {Mode: fs.ModeDir | 0500}, "check": {Mode: 0400, Data: []byte("binfmt")}, - }, nil}, + }, pkg.WNew, nil}, }) destroyStatus(t, base, 2, 0) -- cgit v1.3.1