tests: use testing.T.TempDir rather than os.TempDir (#5709)

This commit is contained in:
Alessandro Ros
2026-04-29 22:47:47 +02:00
committed by GitHub
parent 9a44fd7eaa
commit 66a67188fe
31 changed files with 324 additions and 523 deletions
+1 -2
View File
@@ -10,10 +10,9 @@ import (
)
func TestListen(t *testing.T) {
socket, err := os.CreateTemp(os.TempDir(), "mtx-unix-")
socket, err := os.CreateTemp(t.TempDir(), "mtx-unix-")
require.NoError(t, err)
socket.Close()
defer os.Remove(socket.Name())
l := &Listener{
Path: socket.Name(),