From 83c3ccc070f6a4a41b3934e8b68ef4fa46c629c2 Mon Sep 17 00:00:00 2001 From: Fazlul Shahriar Date: Sun, 18 Jun 2023 16:33:50 -0400 Subject: [PATCH] cmd/acmefocused: re-enable test --- cmd/acmefocused/main_test.go | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/cmd/acmefocused/main_test.go b/cmd/acmefocused/main_test.go index b22a5da..66ce71c 100644 --- a/cmd/acmefocused/main_test.go +++ b/cmd/acmefocused/main_test.go @@ -18,20 +18,19 @@ import ( const testWinID = "42" -// func TestMain(m *testing.M) { -// switch os.Getenv("TEST_MAIN") { -// case "acmefocused": -// listenAndServe(listenAddr(), func(conn net.Conn) { -// fmt.Fprintf(conn, "%s\n", testWinID) -// conn.Close() -// }) -// default: -// os.Exit(m.Run()) -// } -// } +func TestMain(m *testing.M) { + switch os.Getenv("TEST_MAIN") { + case "acmefocused": + listenAndServe(listenAddr(), func(conn net.Conn) { + fmt.Fprintf(conn, "%s\n", testWinID) + conn.Close() + }) + default: + os.Exit(m.Run()) + } +} func TestListenAndServe(t *testing.T) { - t.Skip("hangling in CI; needs investigation") if runtime.GOOS == "windows" { t.Skip("skipping on windows because unix domain sockets are not supported") }