summaryrefslogtreecommitdiff
path: root/player-server/internal/api/integration_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-20 14:18:26 +0300
committerPaul Buetow <paul@buetow.org>2026-05-20 14:18:26 +0300
commit30e95cd41fc26cc2cbef658c47c690eb5e388b04 (patch)
tree6750d3fa31670c6b3c1f2efade0e1348de4ef2d5 /player-server/internal/api/integration_test.go
parent0e5cefc30a4f6bc9d47069d6a3844027afc8bc55 (diff)
Extract app wiring from main.go into internal/app package (9a)
Move all dependency wiring, background worker startup, server lifecycle (Wire, StartBackgroundWorkers, RunServer, RunWithSignal, BuildLogger) into internal/app so cmd/player/main.go becomes thin: parse flags, load config, delegate to app.RunWithSignal. Updated main_test.go to call app.Wire and app.StartBackgroundWorkers directly. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Diffstat (limited to 'player-server/internal/api/integration_test.go')
-rw-r--r--player-server/internal/api/integration_test.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/player-server/internal/api/integration_test.go b/player-server/internal/api/integration_test.go
index 08c0d86..9397de3 100644
--- a/player-server/internal/api/integration_test.go
+++ b/player-server/internal/api/integration_test.go
@@ -71,16 +71,18 @@ func newIntegrationServer(t *testing.T) *integrationEnv {
SessionManager: sm,
Config: cfg,
Services: ServerServices{
- Browse: buildBrowseMock(),
- Write: buildBrowseMock(),
- Share: buildBrowseMock(),
- Tag: buildBrowseMock(),
- Favorite: buildBrowseMock(),
- Note: buildBrowseMock(),
- Admin: buildAdminMock(),
- Progress: buildProgressMock(),
- Auth: authSvc,
- Podcast: &integrationPodcastService{},
+ Media: MediaServices{
+ Browse: buildBrowseMock(),
+ Write: buildBrowseMock(),
+ Share: buildBrowseMock(),
+ Tag: buildBrowseMock(),
+ Favorite: buildBrowseMock(),
+ Note: buildBrowseMock(),
+ Progress: buildProgressMock(),
+ },
+ Admin: buildAdminMock(),
+ Auth: authSvc,
+ Podcast: &integrationPodcastService{},
},
StaticFS: http.FS(staticFS),
MediaStreamer: service.NewMediaStreamer(nil, ""),