7 "github.com/stretchr/testify/require"
10 // socketTestDir returns a new short directory under /tmp for data that holds a
11 // daemon socket. t.TempDir holds the test name and the TMPDIR of the shell, so
12 // its paths can pass the 107-byte limit of a Unix socket path.
13 func socketTestDir(t *testing.T) string {
16 dir, err := os.MkdirTemp("/tmp", "onechat-")
17 require.NoError(t, err)
20 require.NoError(t, os.RemoveAll(dir))