mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-24 09:39:39 +00:00
ipn: don't listen on the unspecified address in test
To avoid the Mac firewall dialog of (test) death.
See 4521a59f30
which I added to help debug this.
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"net/http/cookiejar"
|
||||
"net/http/httptest"
|
||||
"net/url"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -26,6 +27,13 @@ import (
|
||||
"tailscale.io/control" // not yet released
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Hacky way to signal to magicsock for now not to bind on the
|
||||
// unspecified address. TODO(bradfitz): clean up wgengine's
|
||||
// constructors.
|
||||
os.Setenv("IN_TS_TEST", "1")
|
||||
}
|
||||
|
||||
func TestIPN(t *testing.T) {
|
||||
testy.FixLogs(t)
|
||||
defer testy.UnfixLogs(t)
|
||||
|
||||
Reference in New Issue
Block a user