From a52f7038e5a607dd0901244abb791c96deaf9c2d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Wed, 29 Oct 2025 04:09:42 +0900 Subject: internal/env: relocate from app This package is much cleaner to stub independently, and makes no sense to lump into app. Signed-off-by: Ophestra --- internal/app/outcome_test.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'internal/app/outcome_test.go') diff --git a/internal/app/outcome_test.go b/internal/app/outcome_test.go index 740e7db5..5ea3ff99 100644 --- a/internal/app/outcome_test.go +++ b/internal/app/outcome_test.go @@ -4,6 +4,7 @@ import ( "testing" "hakurei.app/hst" + "hakurei.app/internal/env" ) func TestOutcomeStateValid(t *testing.T) { @@ -16,11 +17,11 @@ func TestOutcomeStateValid(t *testing.T) { }{ {"nil", nil, false}, {"zero", new(outcomeState), false}, - {"shim", &outcomeState{Shim: &shimParams{PrivPID: -1, Ops: []outcomeOp{}}, Container: new(hst.ContainerConfig), EnvPaths: new(EnvPaths)}, false}, - {"id", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, Container: new(hst.ContainerConfig), EnvPaths: new(EnvPaths)}, false}, - {"container", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, ID: new(hst.ID), EnvPaths: new(EnvPaths)}, false}, + {"shim", &outcomeState{Shim: &shimParams{PrivPID: -1, Ops: []outcomeOp{}}, Container: new(hst.ContainerConfig), Paths: new(env.Paths)}, false}, + {"id", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, Container: new(hst.ContainerConfig), Paths: new(env.Paths)}, false}, + {"container", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, ID: new(hst.ID), Paths: new(env.Paths)}, false}, {"envpaths", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, ID: new(hst.ID), Container: new(hst.ContainerConfig)}, false}, - {"valid", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, ID: new(hst.ID), Container: new(hst.ContainerConfig), EnvPaths: new(EnvPaths)}, true}, + {"valid", &outcomeState{Shim: &shimParams{PrivPID: 1, Ops: []outcomeOp{}}, ID: new(hst.ID), Container: new(hst.ContainerConfig), Paths: new(env.Paths)}, true}, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { -- cgit v1.3.1