aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/sandbox/container_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-17 02:31:46 +0900
committerOphestra <cat@gensokyo.uk>2025-03-17 02:44:07 +0900
commit9a1f8e129fe0f9919981b8a1d345a9b455bd76de (patch)
treee52f33a3908c256aebb30f059cabd40f371a886f /internal/sandbox/container_test.go
parentee108603572101ad3c285830e04ee248916b6c5d (diff)
sandbox: wrap fmsg interface
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/sandbox/container_test.go')
-rw-r--r--internal/sandbox/container_test.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/internal/sandbox/container_test.go b/internal/sandbox/container_test.go
index 1a629d99..55df60b2 100644
--- a/internal/sandbox/container_test.go
+++ b/internal/sandbox/container_test.go
@@ -23,8 +23,10 @@ import (
func TestContainer(t *testing.T) {
{
oldVerbose := fmsg.Load()
- fmsg.Store(true)
+ oldOutput := sandbox.GetOutput()
+ internal.InstallFmsg(true)
t.Cleanup(func() { fmsg.Store(oldVerbose) })
+ t.Cleanup(func() { sandbox.SetOutput(oldOutput) })
}
testCases := []struct {
@@ -146,7 +148,8 @@ func TestHelperInit(t *testing.T) {
if len(os.Args) != 5 || os.Args[4] != "init" {
return
}
- sandbox.Init(internal.Exit)
+ sandbox.SetOutput(fmsg.Output{})
+ sandbox.Init(fmsg.Prepare, internal.InstallFmsg)
}
func TestHelperCheckContainer(t *testing.T) {