mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
ipn: fix lint complaints in tests.
Signed-off-by: David Anderson <dave@natulte.net>
This commit is contained in:
parent
1cd278aa0b
commit
c3f9f74247
@ -6,9 +6,10 @@
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"tailscale.com/testy"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"tailscale.com/testy"
|
||||
)
|
||||
|
||||
func TestReadWrite(t *testing.T) {
|
||||
@ -33,14 +34,23 @@ func TestReadWrite(t *testing.T) {
|
||||
}
|
||||
|
||||
b, err := ReadMsg(&buf)
|
||||
if err != nil {
|
||||
t.Fatalf("read1 error: %v", err)
|
||||
}
|
||||
if want, got := "Test string1", string(b); want != got {
|
||||
t.Fatalf("read1: %#v != %#v\n", want, got)
|
||||
}
|
||||
b, err = ReadMsg(&buf)
|
||||
if err != nil {
|
||||
t.Fatalf("read2 error: %v", err)
|
||||
}
|
||||
if want, got := "", string(b); want != got {
|
||||
t.Fatalf("read2: %#v != %#v\n", want, got)
|
||||
}
|
||||
b, err = ReadMsg(&buf)
|
||||
if err != nil {
|
||||
t.Fatalf("read3 error: %v", err)
|
||||
}
|
||||
if want, got := "Test3", string(b); want != got {
|
||||
t.Fatalf("read3: %#v != %#v\n", want, got)
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ func checkPrefs(t *testing.T, p Prefs) {
|
||||
if len(b) == 0 {
|
||||
t.Fatalf("default p.ToBytes() failed\n")
|
||||
}
|
||||
if p != p {
|
||||
if !p.Equals(&p) {
|
||||
t.Fatalf("p != p\n")
|
||||
}
|
||||
p2 = p
|
||||
|
Loading…
Reference in New Issue
Block a user