all: make more tests pass/skip in airplane mode

Updates tailscale/corp#19786

Change-Id: Iedc6730fe91c627b556bff5325bdbaf7bf79d8e6
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2024-05-05 11:57:47 -07:00
committed by Brad Fitzpatrick
parent 41f2195899
commit c3c18027c6
7 changed files with 28 additions and 15 deletions

View File

@@ -183,6 +183,10 @@ type DERPNode struct {
CanPort80 bool `json:",omitempty"`
}
func (n *DERPNode) IsTestNode() bool {
return n.STUNTestIP != "" || n.IPv4 == "127.0.0.1"
}
// DotInvalid is a fake DNS TLD used in tests for an invalid hostname.
const DotInvalid = ".invalid"