mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
bug: fix possible nil pointer derefrence in test
This commit is contained in:
parent
ac917aa36a
commit
5a48eee611
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user