X-Git-Url: https://git.giacomolli.uk/onechat/blobdiff_plain/a5c83e92d7feea2e104b5515043a76c8c4c56c60..d7f6fba630444f5065f59cd3729feab92c7798aa:/daemon_start_helper_test.go?ds=sidebyside diff --git a/daemon_start_helper_test.go b/daemon_start_helper_test.go index b09c11b..a27967e 100644 --- a/daemon_start_helper_test.go +++ b/daemon_start_helper_test.go @@ -36,7 +36,7 @@ func daemonStartTestWithWhatsApp(t *testing.T, server *ModelFake, bot *TelegramB func daemonStartTestWithSchedules(t *testing.T, server *ModelFake, bot *TelegramBot, whatsapp *WhatsApp, schedules *Schedules, clock func() time.Time) (string, *Memory) { t.Helper() - dir := socketTestDir(t) + dir := daemonTestSocketDir(t) agent, err := openAgent(filepath.Join(dir, daemonAgentDirName)) require.NoError(t, err) @@ -67,10 +67,10 @@ func daemonStartTestWithSchedules(t *testing.T, server *ModelFake, bot *Telegram return socket, memory } -// socketTestDir returns a new short directory under /tmp for data that holds a -// daemon socket. t.TempDir holds the test name and the TMPDIR of the shell, so -// its paths can pass the 107-byte limit of a Unix socket path. -func socketTestDir(t *testing.T) string { +// daemonTestSocketDir returns a new short directory under /tmp for data that +// holds a daemon socket. t.TempDir holds the test name and the TMPDIR of the +// shell, so its paths can pass the 107-byte limit of a Unix socket path. +func daemonTestSocketDir(t *testing.T) string { t.Helper() dir, err := os.MkdirTemp("/tmp", "onechat-")