Package list golang-github-go-kit-kit / d537d3b
Ugh Peter Bourgon 5 years ago
1 changed file(s) with 7 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
110110 defer proxyServer.Close()
111111
112112 resp, _ := http.Get(proxyServer.URL)
113 if want, have := http.StatusBadGateway, resp.StatusCode; want != have {
114 t.Errorf("want %d, have %d", want, have)
113 switch resp.StatusCode {
114 case http.StatusBadGateway: // go1.7 and beyond
115 break
116 case http.StatusInternalServerError: // to go1.7
117 break
118 default:
119 t.Errorf("want %d or %d, have %d", http.StatusBadGateway, http.StatusInternalServerError, resp.StatusCode)
115120 }
116121 }