bug: fix possible nil pointer derefrence in test

This commit is contained in:
Mike Danese 2015-06-29 20:34:26 -07:00
parent ac917aa36a
commit 5a48eee611

View File

@ -43,6 +43,7 @@ func expectHTTP(url string, code int, t *testing.T) {
r, err := http.Get(url)
if err != nil {
t.Errorf("unexpected error: %v", err)
return
}
if r.StatusCode != code {
t.Errorf("unexpected response: %v", r.StatusCode)