diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-03-17 02:31:46 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-03-17 02:44:07 +0900 |
| commit | 9a1f8e129fe0f9919981b8a1d345a9b455bd76de (patch) | |
| tree | e52f33a3908c256aebb30f059cabd40f371a886f /internal/sandbox/container_test.go | |
| parent | ee108603572101ad3c285830e04ee248916b6c5d (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.go | 7 |
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) { |
