diff options
Diffstat (limited to 'internal/httptransport/metered_round_tripper_test.go')
-rw-r--r-- | internal/httptransport/metered_round_tripper_test.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/httptransport/metered_round_tripper_test.go b/internal/httptransport/metered_round_tripper_test.go index 2b126760..8a298e20 100644 --- a/internal/httptransport/metered_round_tripper_test.go +++ b/internal/httptransport/metered_round_tripper_test.go @@ -10,6 +10,7 @@ import ( "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/require" + "gitlab.com/gitlab-org/gitlab-pages/internal/testhelpers" ) func TestReconfigureMeteredRoundTripper(t *testing.T) { @@ -23,7 +24,7 @@ func TestReconfigureMeteredRoundTripper(t *testing.T) { res, err := mrt.RoundTrip(r) require.NoError(t, err) - defer res.Body.Close() + testhelpers.Close(t, res.Body) require.Equal(t, http.StatusOK, res.StatusCode) body, err := io.ReadAll(res.Body) |