(m http.Handler, path, srcIP string)
| 49 | } |
| 50 | |
| 51 | func get(m http.Handler, path, srcIP string) (int, string) { |
| 52 | req := httptest.NewRequest("GET", path, nil) |
| 53 | req.RemoteAddr = srcIP + ":1234" |
| 54 | rec := httptest.NewRecorder() |
| 55 | m.ServeHTTP(rec, req) |
| 56 | return rec.Result().StatusCode, rec.Body.String() |
| 57 | } |
| 58 | |
| 59 | const ( |
| 60 | tsIP = "100.100.100.100" |
no test coverage detected