diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-07-08 14:19:17 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-07-08 14:19:17 +0900 |
| commit | 3c6e9b3d0526a9338dc897a8e288647b2ec12b10 (patch) | |
| tree | 11116bbe25971f9e29de627857b599974132f8a3 /internal/pkg/exec_test.go | |
| parent | aa5e77ef277d5cb144e4841f3c1ab41282faac01 (diff) | |
internal/pkg: expose cure whence
Useful for cure determinism validation of KindExec.
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 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) |
