From 4e73b1209147b471c410873c87bd0aecd72d66a5 Mon Sep 17 00:00:00 2001 From: lucian-ioan Date: Thu, 30 Nov 2023 09:51:53 +0200 Subject: [PATCH] defer body close --- .../module/awsfargate/task_stats/task_stats_integration_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x-pack/metricbeat/module/awsfargate/task_stats/task_stats_integration_test.go b/x-pack/metricbeat/module/awsfargate/task_stats/task_stats_integration_test.go index 29b347aa6617..5bd7e7466e7d 100644 --- a/x-pack/metricbeat/module/awsfargate/task_stats/task_stats_integration_test.go +++ b/x-pack/metricbeat/module/awsfargate/task_stats/task_stats_integration_test.go @@ -31,6 +31,7 @@ func TestFetch(t *testing.T) { taskStatsResp, err := buildResponse("./_meta/testdata/task_stats.json") assert.NoError(t, err) + defer taskStatsResp.Body.Close() byteTaskResp, err := buildResponse("./_meta/testdata/task.json") assert.NoError(t, err)