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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user