aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sandbox/mount_test.go
diff options
context:
space:
mode:
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 {