fix(tests): initialize ProcessingIssuesHandler in test server setup

The setupTestServer() helper in test_helpers_test.go was not creating
a ProcessingIssuesHandler and not passing one to the router config,
causing a nil pointer dereference when any processing issues route was
hit during tests. Add handler creation and wire it into routerConfig
to match how cmd/server/main.go does it.
This commit is contained in:
2026-04-22 15:43:45 -04:00
parent 01fa49ee1d
commit bc199ca268
+2
View File
@@ -463,6 +463,7 @@ func setupTestServer(t *testing.T) *TestServerSetup {
analyticsHandler := handlers.NewAnalyticsHandler(queries)
queueHandler := handlers.NewQueueHandler(queries, queueProcessor)
systemSettingsHandler := handlers.NewSystemSettingsHandler(queries)
processingIssuesHandler := handlers.NewProcessingIssuesHandler(queries)
// Create refactored handlers (matching main.go)
libraryService := services.NewLibraryService(queries)
@@ -518,6 +519,7 @@ func setupTestServer(t *testing.T) *TestServerSetup {
AnalyticsHandler: analyticsHandler,
QueueHandler: queueHandler,
SystemSettingsHandler: systemSettingsHandler,
ProcessingIssuesHandler: processingIssuesHandler,
CollectionHandler: collectionHandler,
FiltersHandler: filtersHandler,
DashboardHandler: dashboardHandler,