aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/mount_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-03-02 18:37:46 +0900
committerOphestra <cat@gensokyo.uk>2025-03-02 18:37:46 +0900
commit0d3652b793f6dc238667db3ea7939f76e49948c8 (patch)
treec742ebb028bfe8424b70ac0ca2a6b15316417458 /test/sandbox/mount_test.go
parentd8e9d71f87db912d73345fec2f9fcb61b25231cf (diff)
test/sandbox/assert: wrap printf
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'test/sandbox/mount_test.go')
-rw-r--r--test/sandbox/mount_test.go3
1 files changed, 2 insertions, 1 deletions
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 {