feat(load-index): populate battle_pass_level_info from IBattlePassService
Wire IBattlePassService.GetLevelCurveAsync into LoadController so /load/index emits the 100-entry battle_pass_level_info dict when levels are seeded. Also adds BattlePassRepository.ResetLevelCurveCache() to bust the process-level static cache in tests that seed levels after earlier HTTP calls have primed it with an empty list, and updates SVSimTestFactory.SeedGlobalsAsync + the stale Index_surfaces_seeded_globals_after_bootstrap assertion accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ using SVSim.Bootstrap.Importers;
|
||||
using SVSim.Database;
|
||||
using SVSim.Database.Enums;
|
||||
using SVSim.Database.Models;
|
||||
using SVSim.Database.Repositories.BattlePass;
|
||||
using SVSim.Database.Repositories.Deck;
|
||||
using SVSim.Database.Repositories.Viewer;
|
||||
using SVSim.EmulatedEntrypoint;
|
||||
@@ -196,6 +197,8 @@ internal sealed class SVSimTestFactory : WebApplicationFactory<Program>
|
||||
await new AvatarAbilityImporter().ImportAsync(ctx, seedDir);
|
||||
await new ArenaSeasonImporter().ImportAsync(ctx, seedDir);
|
||||
await new BattlePassImporter().ImportAsync(ctx, seedDir);
|
||||
// Reset the process-level level-curve cache so the next HTTP call reads freshly-seeded rows.
|
||||
BattlePassRepository.ResetLevelCurveCache();
|
||||
await new BattlePassSeasonImporter().ImportAsync(ctx, seedDir);
|
||||
await new BattlePassRewardImporter().ImportAsync(ctx, seedDir);
|
||||
await new DailyLoginBonusImporter().ImportAsync(ctx, seedDir);
|
||||
|
||||
Reference in New Issue
Block a user