From 17f2dc31209167f8c95c9a5472ab21261ae9e19c Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Wed, 22 Apr 2026 15:43:45 -0400 Subject: [PATCH] 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. --- cmd/server/tests/test_helpers_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/server/tests/test_helpers_test.go b/cmd/server/tests/test_helpers_test.go index 2f93ae7..03ecbe5 100644 --- a/cmd/server/tests/test_helpers_test.go +++ b/cmd/server/tests/test_helpers_test.go @@ -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,