From 54428f7bbfa08b2d8ef10b85c2d5a6dc419747ea Mon Sep 17 00:00:00 2001 From: Jorge Turrado Date: Thu, 25 Jul 2024 16:39:16 +0200 Subject: [PATCH] Close the body to fix static checks Signed-off-by: Jorge Turrado --- tests/scalers/dynatrace/dynatrace_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/scalers/dynatrace/dynatrace_test.go b/tests/scalers/dynatrace/dynatrace_test.go index 96f57d036da..7d20231a91a 100644 --- a/tests/scalers/dynatrace/dynatrace_test.go +++ b/tests/scalers/dynatrace/dynatrace_test.go @@ -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)