Skip to content

Commit fe34d68

Browse files
committed
fixup! feat(coderd): /debug/health: add parameter to force healthcheck
1 parent 574a2fe commit fe34d68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/debug_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ func TestDebugHealth(t *testing.T) {
4444
for i := 0; i < 10; i++ {
4545
res, err := client.Request(ctx, "GET", "/api/v2/debug/health", nil)
4646
require.NoError(t, err)
47-
defer res.Body.Close()
4847
_, _ = io.ReadAll(res.Body)
48+
res.Body.Close()
4949
require.Equal(t, http.StatusOK, res.StatusCode)
5050
}
5151
// The healthcheck should only have been called once.
@@ -77,8 +77,8 @@ func TestDebugHealth(t *testing.T) {
7777
for i := 0; i < 10; i++ {
7878
res, err := client.Request(ctx, "GET", "/api/v2/debug/health?force=true", nil)
7979
require.NoError(t, err)
80-
defer res.Body.Close()
8180
_, _ = io.ReadAll(res.Body)
81+
res.Body.Close()
8282
require.Equal(t, http.StatusOK, res.StatusCode)
8383
}
8484
// The healthcheck func should have been called each time.

0 commit comments

Comments
 (0)