Skip to content

Commit ef26c5a

Browse files
author
Matthew Fisher
committed
fix(tests): call defer after handling error
1 parent 0cb75fa commit ef26c5a

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/utils/itutils.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@ func GetGlobalConfig() *DeisTestConfig {
8484

8585
func doCurl(url string) ([]byte, error) {
8686
response, err := http.Get(url)
87-
defer response.Body.Close()
8887
if err != nil {
8988
return nil, err
9089
}
91-
90+
defer response.Body.Close()
9291
body, err := ioutil.ReadAll(response.Body)
9392

9493
if !strings.Contains(string(body), "Powered by Deis") {

0 commit comments

Comments
 (0)