()
| 240 | } |
| 241 | |
| 242 | func (s *ServerTestSuite) TestIntoPanicWithAbortHandler() { |
| 243 | mockHandler := func(reqID string, rw server.ResponseWriter, r *http.Request) *server.Error { |
| 244 | panic(http.ErrAbortHandler) |
| 245 | } |
| 246 | |
| 247 | s.router().GET("/test", s.router().WithPanic(mockHandler)) |
| 248 | |
| 249 | req := httptest.NewRequest(http.MethodGet, "/test", nil) |
| 250 | rw := httptest.NewRecorder() |
| 251 | |
| 252 | // Should re-panic with ErrAbortHandler |
| 253 | s.Panics(func() { |
| 254 | s.router().ServeHTTP(rw, req) |
| 255 | }) |
| 256 | } |
| 257 | |
| 258 | func (s *ServerTestSuite) TestIntoPanicWithNonError() { |
| 259 | mockHandler := func(reqID string, rw server.ResponseWriter, r *http.Request) *server.Error { |
nothing calls this directly
no test coverage detected