diff --git a/testhelpers/steps_request.go b/testhelpers/steps_request.go index 82481c0aa..2f0d01e3e 100644 --- a/testhelpers/steps_request.go +++ b/testhelpers/steps_request.go @@ -68,9 +68,8 @@ func (ctx *TestContext) iSendrequestGeneric(method, path, reqBody string) error return err } - // do request + //nolint:bodyclose // the body is closed in SendTestHTTPRequest response, body, err := SendTestHTTPRequest(testServer, method, path, headers, strings.NewReader(reqBody)) - defer func() { _ = response.Body.Close() }() if err != nil { return err }