(t *testing.T)
| 187 | } |
| 188 | |
| 189 | func TestCacheHandler(t *testing.T) { |
| 190 | log.SetOutput(ioutil.Discard) |
| 191 | srv := testServer() |
| 192 | srv.profile = true |
| 193 | s := httptest.NewServer(srv.Handler()) |
| 194 | got, _, err := httpGet(s.URL+"/debug/cache/", jsonMediaType, "") |
| 195 | if err != nil { |
| 196 | t.Fatal(err) |
| 197 | } |
| 198 | want := "{\n \"size\": 0,\n \"capacity\": 100,\n \"evictions\": 0\n}" |
| 199 | if got != want { |
| 200 | t.Errorf("got %q, want %q", got, want) |
| 201 | } |
| 202 | } |
| 203 | |
| 204 | func TestCacheResizeHandler(t *testing.T) { |
| 205 | log.SetOutput(ioutil.Discard) |
nothing calls this directly
no test coverage detected