test: Add statistics test with manual data insertion

- TestStatisticsEndpoints: tests /api/v1/statistics/summary endpoint
- TestPartialMigrationThenSyncThenComplete: tests migration + sync workflow
- insertTestData: helper to insert 5 soundtracks with 8 songs
- getTestToken: helper to get auth token for tests
- Updated other test files to use FindAllSoundtracks instead of FindAllGames

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-01 20:43:40 +02:00
parent cec408187d
commit 0f29c33b1a
3 changed files with 185 additions and 11 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ import (
// ensureSyncRan ensures that sync has been run before testing music endpoints
func ensureSyncRan(t *testing.T, e *echo.Echo) {
repo := repository.New(backend.BackendPool())
games, err := repo.FindAllGames(backend.BackendCtx())
games, err := repo.FindAllSoundtracks(backend.BackendCtx())
assert.NoError(t, err)
if len(games) == 0 {