Merge pull request #10526 from mikedanese/nil-deref-test

bug: fix possible nil pointer derefrence in test
This commit is contained in:
Alex Robinson 2015-06-29 21:01:37 -07:00
commit 835eded294

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)