Skip to content

Commit

Permalink
do not close the response body in iSendrequestGeneric as it is closed…
Browse files Browse the repository at this point in the history
… inside SendTestHTTPRequest()
  • Loading branch information
zenovich committed Oct 11, 2024
1 parent a93c5fd commit bb2f56a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions testhelpers/steps_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit bb2f56a

Please sign in to comment.