Skip to content

Commit e3a2b63

Browse files
committed
Fix go vet errors and add go vet checks to the github actions
1 parent 016b8a7 commit e3a2b63

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
GOTOOLCHAIN=local go version
2929
GOTOOLCHAIN=local go build -v ./...
3030
31+
- name: Vet daemon
32+
run: go vet ./...
33+
3134
- name: Run daemon unit tests
3235
run: go test -race -v ./...
3336

portal/integration_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ func equalCerts(lhs, rhs [][]byte) bool {
409409
func (*PortalTest) AutoRegister_ClientCert(t *testing.T) {
410410
t.Parallel()
411411
ctx, done := context.WithDeadline(t.Context(), time.Now().Add(15*time.Second))
412+
defer done()
412413
ret, wait, err := gate.AutoRegister(ctx, &gate.RegisterRequest{
413414
Pattern: fmt.Sprintf("/%v/", t.Name()),
414415
})
@@ -459,7 +460,8 @@ func (*PortalTest) AutoRegister_Wait(t *testing.T) {
459460
t.Parallel()
460461
const testTime = time.Second
461462
start := time.Now()
462-
ctx, _ := context.WithTimeout(t.Context(), testTime)
463+
ctx, done := context.WithTimeout(t.Context(), testTime)
464+
defer done()
463465
_, wait, err := gate.AutoRegister(ctx, &gate.RegisterRequest{
464466
Pattern: fmt.Sprintf("/%v/", t.Name()),
465467
})

spawn/embedspawn/dashboard.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ func startDashboard(ctx context.Context, children *children, adminAuth *tools.Ba
144144
})
145145
if err != nil {
146146
close(dashboardQuit)
147+
stopDashboard()
147148
return dashboardQuit, err
148149
}
149150
wg.Add(1)
@@ -159,6 +160,7 @@ func startDashboard(ctx context.Context, children *children, adminAuth *tools.Ba
159160
templates, err = templates.ParseFS(templatesFS, "*.tmpl.html")
160161
if err != nil {
161162
close(dashboardQuit)
163+
stopDashboard()
162164
return dashboardQuit, err
163165
}
164166
http.Handle(dashboardUrl, &dashboard{children, templates, adminAuth})

0 commit comments

Comments
 (0)