forked from cerc-io/plugeth
metrics/librato: ensure resp.body closed (#26969)
This change ensures that we call Close on a http response body, in various places in the source code (mostly tests)
This commit is contained in:
@@ -94,6 +94,7 @@ func confirmHTTPRequestYieldsStatusCode(t *testing.T, method, contentType, body
|
||||
if err != nil {
|
||||
t.Fatalf("request failed: %v", err)
|
||||
}
|
||||
resp.Body.Close()
|
||||
confirmStatusCode(t, resp.StatusCode, expectedStatusCode)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user