Skip to content

Commit 42f8154

Browse files
committed
Fix linting
1 parent 98a7740 commit 42f8154

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

enterprise/coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func New(ctx context.Context, options *Options) (*API, error) {
121121
httpmw.ExtractWorkspaceProxyParam(api.Database),
122122
)
123123

124-
r.Get("/", api.getWorkspaceProxy)
124+
r.Get("/", api.fetchWorkspaceProxy)
125125
r.Delete("/", api.deleteWorkspaceProxy)
126126
})
127127
})

enterprise/coderd/workspaceproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ func (api *API) workspaceProxies(rw http.ResponseWriter, r *http.Request) {
258258
// @Param workspaceproxy path string true "Proxy ID or name" format(uuid)
259259
// @Success 200 {object} codersdk.WorkspaceProxy
260260
// @Router /workspaceproxies/{workspaceproxy} [get]
261-
func (api *API) getWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
261+
func (api *API) fetchWorkspaceProxy(rw http.ResponseWriter, r *http.Request) {
262262
var (
263263
ctx = r.Context()
264264
proxy = httpmw.WorkspaceProxyParam(r)

enterprise/coderd/workspaceproxy_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func TestRegions(t *testing.T) {
221221
return false
222222
}
223223
return proxy.Status.Status == codersdk.ProxyHealthy
224-
}, time.Second*10, time.Millisecond*100, "proxy never became healthy")
224+
}, testutil.WaitShort, testutil.IntervalFast, "proxy never became healthy")
225225

226226
_ = proxy.Close()
227227
// The proxy should tell the primary on close that is is no longer healthy.
@@ -231,7 +231,7 @@ func TestRegions(t *testing.T) {
231231
return false
232232
}
233233
return proxy.Status.Status == codersdk.ProxyUnhealthy
234-
}, time.Second*10, time.Millisecond*100, "proxy never became unhealthy after close")
234+
}, testutil.WaitShort, testutil.IntervalFast, "proxy never became unhealthy after close")
235235
})
236236
}
237237

enterprise/wsproxy/wsproxy.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ func (s *Server) healthReport(rw http.ResponseWriter, r *http.Request) {
292292
// app, so the webserver AND the proxy will be shut down at the same time.
293293
if s.ctx.Err() != nil {
294294
httpapi.Write(r.Context(), rw, http.StatusInternalServerError, "workspace proxy in middle of shutting down")
295+
return
295296
}
296297

297298
// Hit the build info to do basic version checking.

0 commit comments

Comments
 (0)