aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/outcome_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-10-29 04:09:42 +0900
committerOphestra <cat@gensokyo.uk>2025-10-29 04:11:49 +0900
commita52f7038e5a607dd0901244abb791c96deaf9c2d (patch)
tree2184b7313cf3b2d783778e8272ac22d0eaa1603f /internal/app/outcome_test.go
parent274686d10d3386a41f8fb6bc3363269a734afe0e (diff)
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/app/outcome_test.go')
-rw-r--r--internal/app/outcome_test.go9
1 files changed, 5 insertions, 4 deletions
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) {