Skip to content

Commit 74f779f

Browse files
authored
Merge pull request kubernetes#69087 from tanshanshan/error926
make sure to check for errors and close the request body in the cluster size autoscaling e2e test
2 parents 173846b + 65af391 commit 74f779f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/e2e/autoscaling/cluster_size_autoscaling.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,11 @@ func executeHTTPRequest(method string, url string, body string) (string, error)
11951195
return "", err
11961196
}
11971197
resp, err := client.Do(req)
1198+
if err != nil {
1199+
return "", err
1200+
}
1201+
defer resp.Body.Close()
1202+
11981203
respBody, err := ioutil.ReadAll(resp.Body)
11991204
if err != nil {
12001205
return "", err

0 commit comments

Comments
 (0)