From d68126af9970a9e4f0e4c429f199fbfe4c42e9ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Thu, 14 Oct 2021 14:23:36 +0200 Subject: [PATCH] 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. --- pkg/liveshare/port_forwarder_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/liveshare/port_forwarder_test.go b/pkg/liveshare/port_forwarder_test.go index 04023c03b..02b4e29fd 100644 --- a/pkg/liveshare/port_forwarder_test.go +++ b/pkg/liveshare/port_forwarder_test.go @@ -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) }