From 0d3652b793f6dc238667db3ea7939f76e49948c8 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 2 Mar 2025 18:37:46 +0900 Subject: test/sandbox/assert: wrap printf Signed-off-by: Ophestra --- test/sandbox/mount_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/sandbox/mount_test.go') diff --git a/test/sandbox/mount_test.go b/test/sandbox/mount_test.go index 425ce6d7..74074121 100644 --- a/test/sandbox/mount_test.go +++ b/test/sandbox/mount_test.go @@ -111,7 +111,8 @@ overlay /.fortify/sbin/fortify overlay ro,nosuid,nodev,relatime,lowerdir=/mnt-ro }) t.Run(tc.name+" assert", func(t *testing.T) { - sandbox.ReplaceFatal(t.Fatalf) + oldFatal := sandbox.SwapFatal(t.Fatalf) + t.Cleanup(func() { sandbox.SwapFatal(oldFatal) }) wantFile := path.Join(t.TempDir(), "want.json") if f, err := os.OpenFile(wantFile, os.O_CREATE|os.O_WRONLY, 0400); err != nil { -- cgit v1.3.1