Skip to content

Commit ca36623

Browse files
committed
fmt
1 parent 33b6fb5 commit ca36623

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

coderd/healthcheck/derphealth/derp.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,7 @@ func (r *RegionReport) Run(ctx context.Context) {
144144
r.Warnings = []health.Message{}
145145

146146
wg := &sync.WaitGroup{}
147-
var (
148-
unhealthyNodes int // atomic.Int64 is not mandatory as we depend on RegionReport mutex.
149-
)
147+
var unhealthyNodes int // atomic.Int64 is not mandatory as we depend on RegionReport mutex.
150148

151149
wg.Add(len(r.Region.Nodes))
152150
for _, node := range r.Region.Nodes {

coderd/healthcheck/derphealth/derp_test.go

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -374,30 +374,31 @@ func TestDERP(t *testing.T) {
374374
ctx = context.Background()
375375
report = derphealth.Report{}
376376
opts = &derphealth.ReportOptions{
377-
DERPMap: &tailcfg.DERPMap{Regions: map[int]*tailcfg.DERPRegion{
378-
1: {
379-
EmbeddedRelay: true,
380-
RegionID: 999,
381-
Nodes: []*tailcfg.DERPNode{{
382-
Name: "badstun",
383-
RegionID: 999,
384-
HostName: "badstun.example.com",
385-
STUNPort: 19302,
386-
STUNOnly: true,
387-
InsecureForTests: true,
388-
ForceHTTP: true,
389-
}, {
390-
Name: "goodstun",
391-
RegionID: 999,
392-
HostName: "stun.l.google.com",
393-
STUNPort: 19302,
394-
STUNOnly: true,
395-
InsecureForTests: true,
396-
ForceHTTP: true,
397-
}},
377+
DERPMap: &tailcfg.DERPMap{
378+
Regions: map[int]*tailcfg.DERPRegion{
379+
1: {
380+
EmbeddedRelay: true,
381+
RegionID: 999,
382+
Nodes: []*tailcfg.DERPNode{{
383+
Name: "badstun",
384+
RegionID: 999,
385+
HostName: "badstun.example.com",
386+
STUNPort: 19302,
387+
STUNOnly: true,
388+
InsecureForTests: true,
389+
ForceHTTP: true,
390+
}, {
391+
Name: "goodstun",
392+
RegionID: 999,
393+
HostName: "stun.l.google.com",
394+
STUNPort: 19302,
395+
STUNOnly: true,
396+
InsecureForTests: true,
397+
ForceHTTP: true,
398+
}},
399+
},
398400
},
399401
},
400-
},
401402
}
402403
)
403404

@@ -430,22 +431,23 @@ func TestDERP(t *testing.T) {
430431
ctx = context.Background()
431432
report = derphealth.Report{}
432433
opts = &derphealth.ReportOptions{
433-
DERPMap: &tailcfg.DERPMap{Regions: map[int]*tailcfg.DERPRegion{
434-
1: {
435-
EmbeddedRelay: true,
436-
RegionID: 999,
437-
Nodes: []*tailcfg.DERPNode{{
438-
Name: "badstun",
439-
RegionID: 999,
440-
HostName: "badstun.example.com",
441-
STUNPort: 19302,
442-
STUNOnly: true,
443-
InsecureForTests: true,
444-
ForceHTTP: true,
445-
}},
434+
DERPMap: &tailcfg.DERPMap{
435+
Regions: map[int]*tailcfg.DERPRegion{
436+
1: {
437+
EmbeddedRelay: true,
438+
RegionID: 999,
439+
Nodes: []*tailcfg.DERPNode{{
440+
Name: "badstun",
441+
RegionID: 999,
442+
HostName: "badstun.example.com",
443+
STUNPort: 19302,
444+
STUNOnly: true,
445+
InsecureForTests: true,
446+
ForceHTTP: true,
447+
}},
448+
},
446449
},
447450
},
448-
},
449451
}
450452
)
451453

0 commit comments

Comments
 (0)