Skip to content

Commit

Permalink
cmd/acmefocused: re-enable test
Browse files Browse the repository at this point in the history
  • Loading branch information
fhs committed Jun 18, 2023
1 parent 5e36ee4 commit 83c3ccc
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions cmd/acmefocused/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down

0 comments on commit 83c3ccc

Please sign in to comment.