Skip to content

Commit

Permalink
fix: add response closures to web_test.go (#10675)
Browse files Browse the repository at this point in the history
* fix: add response closures to web_test.go

Signed-off-by: mtfoley <mtfoley.mae@gmail.com>
  • Loading branch information
mtfoley committed Jun 17, 2022
1 parent ddfa9a7 commit ee11771
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/web_test.go
Expand Up @@ -566,6 +566,9 @@ func TestAgentAPIEndPoints(t *testing.T) {
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
require.Equal(t, http.StatusUnprocessableEntity, resp.StatusCode)
t.Cleanup(func() {
require.NoError(t, resp.Body.Close())
})
}
}

Expand All @@ -584,6 +587,9 @@ func TestAgentAPIEndPoints(t *testing.T) {
resp, err := http.DefaultClient.Do(req)
require.NoError(t, err)
require.Equal(t, http.StatusOK, resp.StatusCode)
t.Cleanup(func() {
require.NoError(t, resp.Body.Close())
})
}
}
}
Expand Down

0 comments on commit ee11771

Please sign in to comment.