all: gofmt -w -s (simplify) tests

And it updates the build tag style on a couple files.

Change-Id: I84478d822c8de3f84b56fa1176c99d2ea5083237
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2021-12-15 08:42:25 -08:00
parent 59f4f33f60
commit 486059589b
11 changed files with 34 additions and 31 deletions

View File

@@ -401,14 +401,14 @@ func TestPickDERPFallback(t *testing.T) {
c := newConn()
dm := &tailcfg.DERPMap{
Regions: map[int]*tailcfg.DERPRegion{
1: &tailcfg.DERPRegion{},
2: &tailcfg.DERPRegion{},
3: &tailcfg.DERPRegion{},
4: &tailcfg.DERPRegion{},
5: &tailcfg.DERPRegion{},
6: &tailcfg.DERPRegion{},
7: &tailcfg.DERPRegion{},
8: &tailcfg.DERPRegion{},
1: {},
2: {},
3: {},
4: {},
5: {},
6: {},
7: {},
8: {},
},
}
c.derpMap = dm
@@ -1011,7 +1011,7 @@ func testTwoDevicePing(t *testing.T, d *devices) {
PrivateKey: m1.privateKey,
Addresses: []netaddr.IPPrefix{netaddr.MustParseIPPrefix("1.0.0.1/32")},
Peers: []wgcfg.Peer{
wgcfg.Peer{
{
PublicKey: m2.privateKey.Public(),
DiscoKey: m2.conn.DiscoPublicKey(),
AllowedIPs: []netaddr.IPPrefix{netaddr.MustParseIPPrefix("1.0.0.2/32")},
@@ -1023,7 +1023,7 @@ func testTwoDevicePing(t *testing.T, d *devices) {
PrivateKey: m2.privateKey,
Addresses: []netaddr.IPPrefix{netaddr.MustParseIPPrefix("1.0.0.2/32")},
Peers: []wgcfg.Peer{
wgcfg.Peer{
{
PublicKey: m1.privateKey.Public(),
DiscoKey: m1.conn.DiscoPublicKey(),
AllowedIPs: []netaddr.IPPrefix{netaddr.MustParseIPPrefix("1.0.0.1/32")},

View File

@@ -99,7 +99,7 @@ func TestUserspaceEngineReconfig(t *testing.T) {
} {
nm := &netmap.NetworkMap{
Peers: []*tailcfg.Node{
&tailcfg.Node{
{
Key: nkFromHex(nodeHex),
},
},

View File

@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build windows
// +build windows
package winnet