From 9a1f8e129fe0f9919981b8a1d345a9b455bd76de Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 17 Mar 2025 02:31:46 +0900 Subject: sandbox: wrap fmsg interface Signed-off-by: Ophestra --- internal/sandbox/container_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'internal/sandbox/container_test.go') 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) { -- cgit v1.3.1