(t *testing.T)
| 10 | ) |
| 11 | |
| 12 | func TestDebugModule(t *testing.T) { |
| 13 | router := mux.NewRouter() |
| 14 | DebugModule{}.ProvideHTTP(router) |
| 15 | |
| 16 | paths := []string{ |
| 17 | "/debug/pprof/cmdline", |
| 18 | "/debug/pprof/profile?seconds=1", |
| 19 | "/debug/pprof/symbol", |
| 20 | "/debug/pprof/trace", |
| 21 | "/debug/pprof/heap", |
| 22 | "/debug/pprof/allocs", |
| 23 | "/debug/pprof/block", |
| 24 | "/debug/pprof/goroutine", |
| 25 | "/debug/pprof/mutex", |
| 26 | "/debug/pprof/threadcreate", |
| 27 | } |
| 28 | for _, path := range paths { |
| 29 | t.Run(path, func(t *testing.T) { |
| 30 | req := httptest.NewRequest("GET", path, nil) |
| 31 | rr := httptest.NewRecorder() |
| 32 | router.ServeHTTP(rr, req) |
| 33 | assert.Equal(t, http.StatusOK, rr.Code) |
| 34 | }) |
| 35 | } |
| 36 | } |
nothing calls this directly
no test coverage detected