refactor(tests): enhance test infrastructure with library/collection helpers

- Add LibraryTestData struct to TestDeviceSetup
- Implement CreateLibrary() for proper library creation in tests
- Implement CreateCollection() for test collection support
- Improve test isolation with dedicated library creation

This provides a more robust foundation for integration tests that need
proper library management support.
This commit is contained in:
2026-02-13 20:04:47 -05:00
parent 8ed0bdb040
commit 368c790c67
11 changed files with 849 additions and 556 deletions
-2
View File
@@ -120,7 +120,6 @@ func main() {
// NEW: Create refactored handlers
collectionHandler := handlers.NewCollectionHandler(queries, connManager)
mediaHandler := handlers.NewMediaHandler(queries, libraryService, worker)
searchHandler := handlers.NewSearchHandler(queries)
matchingHandler := handlers.NewMatchingHandler(queries, connManager)
e := echo.New()
@@ -162,7 +161,6 @@ func main() {
LibraryHandler: libraryHandler,
DeviceHandler: deviceHandler,
MediaHandler: mediaHandler,
SearchHandler: searchHandler,
MatchingHandler: matchingHandler,
KOReaderHandler: koreaderHandler,
WSHandler: wsHandler,