(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func TestSnapshotHandler_Err(t *testing.T) { |
| 39 | t.Parallel() |
| 40 | data := []string{ |
| 41 | "/debug?augment=2", |
| 42 | "/debug?maxmem=abc", |
| 43 | "/debug?similarity=alike", |
| 44 | } |
| 45 | for _, url := range data { |
| 46 | url := url |
| 47 | t.Run(url, func(t *testing.T) { |
| 48 | t.Parallel() |
| 49 | req := httptest.NewRequest("GET", url, nil) |
| 50 | w := httptest.NewRecorder() |
| 51 | SnapshotHandler(w, req) |
| 52 | if w.Code != 400 { |
| 53 | t.Fatalf("%s: %d\n%s", url, w.Code, w.Body.String()) |
| 54 | } |
| 55 | }) |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | func TestSnapshotHandler_Method_POST(t *testing.T) { |
| 60 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…