Merge pull request #69087 from tanshanshan/error926

make sure to check for errors and close the request body in the cluster size autoscaling e2e test
This commit is contained in:
Kubernetes Prow Robot 2018-12-29 01:58:26 -08:00 committed by GitHub
commit 74f779fbb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1195,6 +1195,11 @@ func executeHTTPRequest(method string, url string, body string) (string, error)
return "", err
}
resp, err := client.Do(req)
if err != nil {
return "", err
}
defer resp.Body.Close()
respBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
return "", err