Avoid macOS prompt to allow incoming connections in liveshare tests

Listening on the localhost interface disallows connections from the
outside anyway, so the OS firewall doesn't have to prompt whether the
user wants to allow incoming connections to the Go process.
This commit is contained in:
Mislav Marohnić 2021-10-14 14:23:36 +02:00
parent 53479c712c
commit d68126af99

View file

@ -46,7 +46,7 @@ func TestPortForwarderStart(t *testing.T) {
}
defer testServer.Close()
listen, err := net.Listen("tcp", ":8000")
listen, err := net.Listen("tcp", "127.0.0.1:8000")
if err != nil {
t.Fatal(err)
}