Skip to content

Commit

Permalink
Close the http response body
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Wang <[email protected]>
  • Loading branch information
ahrtr committed Jan 30, 2025
1 parent f5973c9 commit 73700e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/e2e/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ func getMetrics(metricsURL string) (map[string]*dto.MetricFamily, error) {
if err != nil {
return nil, err
}
defer resp.Body.Close()

data, err := io.ReadAll(resp.Body)
if err != nil {
Expand Down

0 comments on commit 73700e3

Please sign in to comment.