diff --git a/modules/messenger/cmd/messenger/answers_test.go b/modules/messenger/cmd/messenger/answers_test.go index f14a6903..2a5eed39 100644 --- a/modules/messenger/cmd/messenger/answers_test.go +++ b/modules/messenger/cmd/messenger/answers_test.go @@ -848,6 +848,12 @@ func TestBreakGlassIsAFileRootMadeAndTheMinuteGoesOn(t *testing.T) { t.Fatal("the router's minute hung on a break-glass file") } } + // Who owns the file is what the kernel says, faked here both ways: the build seat runs this suite as root, where + // every file the test makes is root's, and a person runs it as themselves (the forge's check of 2026-10-09 failed + // on the first and passed on the second). + was := fileOwner + t.Cleanup(func() { fileOwner = was }) + fileOwner = func(os.FileInfo) uint32 { return 1000 } if err := os.WriteFile(filepath.Join(h.StateDir, "unlink.telegram"), nil, 0o600); err != nil { t.Fatal(err) } @@ -859,8 +865,6 @@ func TestBreakGlassIsAFileRootMadeAndTheMinuteGoesOn(t *testing.T) { if _, err := h.Unlink("telegram"); err != nil { t.Fatal(err) } - was := fileOwner - t.Cleanup(func() { fileOwner = was }) fileOwner = func(os.FileInfo) uint32 { return 0 } _ = os.WriteFile(filepath.Join(h.StateDir, "unlink.telegram"), nil, 0o600) tick()