feat: add track seeding migrations, catalog definitions, and test infrastructure for race leaderboards

This commit is contained in:
2026-07-15 18:59:58 +04:00
parent a56841237d
commit 53288ea670
7 changed files with 1668 additions and 1243 deletions
+6 -6
View File
@@ -294,17 +294,17 @@ func TestLeaderboard(t *testing.T) {
t.Fatalf("expected 3 calendar entries, got %d", len(res))
}
// 1. Monaco (finished)
if res[0].TrackID != "monaco" || res[0].Status != "finished" {
t.Errorf("expected monaco (finished), got %s (%s)", res[0].TrackID, res[0].Status)
// 1. Austria (planned)
if res[0].TrackID != "austria-redbull-ring" || res[0].Status != "planned" {
t.Errorf("expected austria-redbull-ring (planned), got %s (%s)", res[0].TrackID, res[0].Status)
}
// 2. Barcelona (active)
if res[1].TrackID != "barcelona-catalunya" || res[1].Status != "active" {
t.Errorf("expected barcelona-catalunya (active), got %s (%s)", res[1].TrackID, res[1].Status)
}
// 3. Austria (planned)
if res[2].TrackID != "austria-redbull-ring" || res[2].Status != "planned" {
t.Errorf("expected austria-redbull-ring (planned), got %s (%s)", res[2].TrackID, res[2].Status)
// 3. Monaco (finished)
if res[2].TrackID != "monaco" || res[2].Status != "finished" {
t.Errorf("expected monaco (finished), got %s (%s)", res[2].TrackID, res[2].Status)
}
})
}