Skip to content

Commit

Permalink
Close the body to fix static checks
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <[email protected]>
  • Loading branch information
JorTurFer committed Jul 25, 2024
1 parent d6971dc commit 54428f7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/scalers/dynatrace/dynatrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func setMetricValue(t *testing.T, value float64, stopCh <-chan struct{}) {
t.Log("Error executing request")
continue
}
defer r.Body.Close()
if r.StatusCode != http.StatusAccepted {
msg := fmt.Sprintf("%s: api returned %d", r.Request.URL.Path, r.StatusCode)
t.Log(msg)
Expand Down

0 comments on commit 54428f7

Please sign in to comment.