Report handler panics through the logger and answer 500 (closes #187)
All checks were successful
check / check (push) Successful in 2m50s
All checks were successful
check / check (push) Successful in 2m50s
This commit was merged in pull request #189.
This commit is contained in:
@@ -52,6 +52,15 @@ type testEnv struct {
|
||||
sess *session.Session
|
||||
db *database.Database
|
||||
dbMgr *database.WebhookDBManager
|
||||
|
||||
// The collaborators the router was built from, kept so a test
|
||||
// that needs a second router over the same graph — one carrying
|
||||
// a panicking probe route, or one with Sentry registered — can
|
||||
// build it without wiring the graph again.
|
||||
log *logger.Logger
|
||||
cfg *config.Config
|
||||
mw *middleware.Middleware
|
||||
hnd *handlers.Handlers
|
||||
}
|
||||
|
||||
// newTestEnv wires the dependency graph with fx and builds the
|
||||
@@ -100,6 +109,10 @@ func newTestEnv(t *testing.T) *testEnv {
|
||||
sess: sess,
|
||||
db: db,
|
||||
dbMgr: dbMgr,
|
||||
log: log,
|
||||
cfg: cfg,
|
||||
mw: mw,
|
||||
hnd: hnd,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user