|
|
@ -21,6 +21,7 @@ import (
|
|
|
|
"tailscale.com/net/stun"
|
|
|
|
"tailscale.com/net/stun"
|
|
|
|
"tailscale.com/net/stun/stuntest"
|
|
|
|
"tailscale.com/net/stun/stuntest"
|
|
|
|
"tailscale.com/tailcfg"
|
|
|
|
"tailscale.com/tailcfg"
|
|
|
|
|
|
|
|
"tailscale.com/util/strs"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
func TestHairpinSTUN(t *testing.T) {
|
|
|
|
func TestHairpinSTUN(t *testing.T) {
|
|
|
@ -616,7 +617,7 @@ func TestLogConciseReport(t *testing.T) {
|
|
|
|
var buf bytes.Buffer
|
|
|
|
var buf bytes.Buffer
|
|
|
|
c := &Client{Logf: func(f string, a ...any) { fmt.Fprintf(&buf, f, a...) }}
|
|
|
|
c := &Client{Logf: func(f string, a ...any) { fmt.Fprintf(&buf, f, a...) }}
|
|
|
|
c.logConciseReport(tt.r, dm)
|
|
|
|
c.logConciseReport(tt.r, dm)
|
|
|
|
if got := strings.TrimPrefix(buf.String(), "[v1] report: "); got != tt.want {
|
|
|
|
if got, ok := strs.CutPrefix(buf.String(), "[v1] report: "); !ok {
|
|
|
|
t.Errorf("unexpected result.\n got: %#q\nwant: %#q\n", got, tt.want)
|
|
|
|
t.Errorf("unexpected result.\n got: %#q\nwant: %#q\n", got, tt.want)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|