Commit 835eded2 authored by Alex Robinson's avatar Alex Robinson

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

bug: fix possible nil pointer derefrence in test
parents 7ad50cf0 5a48eee6
...@@ -43,6 +43,7 @@ func expectHTTP(url string, code int, t *testing.T) { ...@@ -43,6 +43,7 @@ func expectHTTP(url string, code int, t *testing.T) {
r, err := http.Get(url) r, err := http.Get(url)
if err != nil { if err != nil {
t.Errorf("unexpected error: %v", err) t.Errorf("unexpected error: %v", err)
return
} }
if r.StatusCode != code { if r.StatusCode != code {
t.Errorf("unexpected response: %v", r.StatusCode) t.Errorf("unexpected response: %v", r.StatusCode)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment