(t *testing.T)
| 202 | } |
| 203 | |
| 204 | func TestCacheResizeHandler(t *testing.T) { |
| 205 | log.SetOutput(ioutil.Discard) |
| 206 | srv := testServer() |
| 207 | srv.profile = true |
| 208 | s := httptest.NewServer(srv.Handler()) |
| 209 | _, got, err := httpPost(s.URL+"/debug/cache/resize", "10") |
| 210 | if err != nil { |
| 211 | t.Fatal(err) |
| 212 | } |
| 213 | want := "{\n \"message\": \"Changed cache capacity to 10.\"\n}" |
| 214 | if got != want { |
| 215 | t.Errorf("got %q, want %q", got, want) |
| 216 | } |
| 217 | } |
| 218 | |
| 219 | func TestIPv4FromRequest(t *testing.T) { |
| 220 | var tests = []ipTestCase{ |
nothing calls this directly
no test coverage detected