Skip to content

Commit 9efda33

Browse files
author
Gabriel Monroy
committed
Merge pull request #2178 from aledbf/ref_tests_timeout
ref(test): close the response body and indicate the status code.
2 parents bc83b63 + eae7878 commit 9efda33

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/utils/itutils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,15 @@ func GetGlobalConfig() *DeisTestConfig {
8484

8585
func doCurl(url string) ([]byte, error) {
8686
response, err := http.Get(url)
87+
defer response.Body.Close()
8788
if err != nil {
8889
return nil, err
8990
}
9091

9192
body, err := ioutil.ReadAll(response.Body)
9293

9394
if !strings.Contains(string(body), "Powered by Deis") {
94-
return nil, fmt.Errorf("App not started")
95+
return nil, fmt.Errorf("App not started (%d)", response.StatusCode)
9596
}
9697

9798
return body, nil
@@ -117,7 +118,6 @@ func Curl(t *testing.T, params *DeisTestConfig) {
117118
t.Fatal(err)
118119
}
119120
fmt.Println(string(body))
120-
121121
}
122122

123123
// AuthCancel tests whether `deis auth:cancel` destroys a user's account.

0 commit comments

Comments
 (0)