chore(bootstrap): refresh stale GlobalsImporter references in docs/test names
This commit is contained in:
@@ -229,7 +229,7 @@ public class LoadControllerTests
|
||||
[Test]
|
||||
public async Task Index_surfaces_seeded_globals_after_bootstrap()
|
||||
{
|
||||
// Verifies the end-to-end seed → repo → controller wiring for the prod-captured globals.
|
||||
// Verifies the end-to-end seed → repo → controller wiring for the load-index globals.
|
||||
// Counts and spot-checked values come from the 2026-05-23 capture; if a recapture lands
|
||||
// with different cardinalities, update the assertions alongside.
|
||||
using var factory = new SVSimTestFactory();
|
||||
@@ -278,7 +278,7 @@ public class LoadControllerTests
|
||||
Assert.That(mri.GetProperty("abilities").EnumerateObject().Count(), Is.EqualTo(6));
|
||||
|
||||
// my_rotation_info.schedules drives the client's "Custom Rotation" button visibility
|
||||
// (Wizard/MyRotationAllInfo.cs:45 — IsMyRotationEnable). GlobalsImporter sources the
|
||||
// (Wizard/MyRotationAllInfo.cs:45 — IsMyRotationEnable). RotationConfigImporter sources the
|
||||
// window from the prod capture; default-initialised DateTime.MinValue values would hide
|
||||
// the button. Assert the captured 2024→2030 free_battle window round-trips through the
|
||||
// MyRotationScheduleConfig section.
|
||||
@@ -299,7 +299,7 @@ public class LoadControllerTests
|
||||
Assert.That(pri.GetProperty("id").GetString(), Is.EqualTo("1"));
|
||||
|
||||
// rotation_card_set_id_list: now comes from the real CardSets table — six entries after
|
||||
// GlobalsImporter flags IsInRotation on the rotation_card_set_id_list seeded ids. But
|
||||
// RotationFlagUpdater flags IsInRotation on the rotation_card_set_ids seeded list. But
|
||||
// CardImport isn't run in tests, so the table is empty and we fall back to StubRotationSets
|
||||
// (3 entries). That's still ≥ 2 so the client won't crash.
|
||||
Assert.That(root.GetProperty("rotation_card_set_id_list").GetArrayLength(),
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace SVSim.UnitTests.Controllers;
|
||||
/// Drives the importer + controller against the full production pack seed (35 packs). Guards
|
||||
/// against regressions in either layer caused by future seed refreshes.
|
||||
/// </summary>
|
||||
public class PackControllerProdCaptureTests
|
||||
public class PackControllerFullCatalogTests
|
||||
{
|
||||
[Test]
|
||||
public async Task Info_returns_full_35_pack_catalog_from_prod_capture()
|
||||
public async Task Info_returns_full_35_pack_catalog_from_production_seed()
|
||||
{
|
||||
// The production seed (packs.json) is overlaid by a 3-pack test fixture in the default test
|
||||
// output dir (see SVSim.UnitTests.csproj). For this test we need the FULL 35-pack catalog,
|
||||
@@ -29,7 +29,7 @@ public class PackControllerProdCaptureTests
|
||||
File.Copy(prodSeed, Path.Combine(tempSeedDir, "packs.json"));
|
||||
|
||||
using var factory = new SVSimTestFactory();
|
||||
// Run the default seed pipeline first so GlobalsImporter populates surrounding tables,
|
||||
// Run the default seed pipeline first so the per-domain importers populate surrounding tables,
|
||||
// then re-run PackImporter against the prod seed to overwrite the fixture-loaded packs.
|
||||
await factory.SeedGlobalsAsync();
|
||||
using (var scope = factory.Services.CreateScope())
|
||||
@@ -30,7 +30,7 @@ public class PracticeControllerTests
|
||||
public async Task Info_returns_non_empty_opponent_array()
|
||||
{
|
||||
using var factory = new SVSimTestFactory();
|
||||
// Practice opponents are bootstrapped from prod-captures/practice-info-*.json into the
|
||||
// Practice opponents are bootstrapped from seeds/practice-opponents.json into the
|
||||
// PracticeOpponents table — empty by default in tests, so seed first.
|
||||
await factory.SeedGlobalsAsync();
|
||||
long viewerId = await factory.SeedViewerAsync();
|
||||
|
||||
@@ -6,13 +6,13 @@ using SVSim.UnitTests.Infrastructure;
|
||||
|
||||
namespace SVSim.UnitTests.Importers;
|
||||
|
||||
public class GlobalsImporterPackTests
|
||||
public class PackSeedingPipelineTests
|
||||
{
|
||||
[Test]
|
||||
public async Task ImportAll_loads_pack_catalog_from_fixture()
|
||||
public async Task SeedGlobals_loads_pack_catalog_from_fixture()
|
||||
{
|
||||
using var factory = new SVSimTestFactory();
|
||||
await factory.SeedGlobalsAsync(); // uses prod-captures fixture dir copied into test output
|
||||
await factory.SeedGlobalsAsync(); // uses test-fixture seed overlay copied into the test output dir (see SVSim.UnitTests.csproj)
|
||||
|
||||
using var scope = factory.Services.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<SVSimDbContext>();
|
||||
@@ -28,7 +28,7 @@ public class GlobalsImporterPackTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ImportAll_persists_child_gachas_with_correct_types_and_costs()
|
||||
public async Task SeedGlobals_persists_child_gachas_with_correct_types_and_costs()
|
||||
{
|
||||
using var factory = new SVSimTestFactory();
|
||||
await factory.SeedGlobalsAsync();
|
||||
@@ -46,7 +46,7 @@ public class GlobalsImporterPackTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ImportAll_is_idempotent_on_rerun()
|
||||
public async Task SeedGlobals_is_idempotent_on_rerun()
|
||||
{
|
||||
using var factory = new SVSimTestFactory();
|
||||
await factory.SeedGlobalsAsync();
|
||||
@@ -5,7 +5,7 @@ using SVSim.UnitTests.Infrastructure;
|
||||
|
||||
namespace SVSim.UnitTests.Importers;
|
||||
|
||||
public class GlobalsImporterPuzzleTests
|
||||
public class PuzzleSeedingPipelineTests
|
||||
{
|
||||
[Test]
|
||||
public async Task ImportsAllPuzzleGroupsAndPuzzles()
|
||||
@@ -66,7 +66,7 @@ public class GameConfigurationJsonbTests
|
||||
{
|
||||
var db = scope.ServiceProvider.GetRequiredService<SVSimDbContext>();
|
||||
var rotation = await db.GameConfigs.FirstAsync(s => s.SectionName == "Rotation");
|
||||
// Hydrate, mutate, re-serialise — same pattern GlobalsImporter and any admin-write
|
||||
// Hydrate, mutate, re-serialise — the pattern RotationConfigImporter and any admin-write
|
||||
// path will use.
|
||||
var value = JsonSerializer.Deserialize<RotationConfig>(rotation.ValueJson)!;
|
||||
value.TsRotationId = "99999";
|
||||
@@ -130,7 +130,7 @@ public class GameConfigurationJsonbTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task GlobalsImporter_updates_Rotation_without_clobbering_other_sections()
|
||||
public async Task RotationConfigImporter_updates_Rotation_without_clobbering_other_sections()
|
||||
{
|
||||
using var factory = new SVSimTestFactory();
|
||||
await factory.SeedGlobalsAsync(); // imports load-index which has ts_rotation_id="10015"
|
||||
@@ -141,12 +141,12 @@ public class GameConfigurationJsonbTests
|
||||
var rotation = JsonSerializer.Deserialize<RotationConfig>(
|
||||
(await db.GameConfigs.FirstAsync(s => s.SectionName == "Rotation")).ValueJson)!;
|
||||
Assert.That(rotation.TsRotationId, Is.EqualTo("10015"),
|
||||
"GlobalsImporter should set Rotation.TsRotationId from the prod capture.");
|
||||
"RotationConfigImporter should set Rotation.TsRotationId from the seed.");
|
||||
|
||||
// PackRates is NOT in the load-index capture; its row must keep ShippedDefaults values.
|
||||
var packRates = JsonSerializer.Deserialize<PackRateConfig>(
|
||||
(await db.GameConfigs.FirstAsync(s => s.SectionName == "PackRates")).ValueJson)!;
|
||||
Assert.That(packRates.AnimatedRate, Is.EqualTo(0.08).Within(1e-9),
|
||||
"GlobalsImporter must not clobber PackRates while updating Rotation.");
|
||||
"RotationConfigImporter must not clobber PackRates while updating Rotation.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ using SVSim.UnitTests.Infrastructure;
|
||||
namespace SVSim.UnitTests.Repositories;
|
||||
|
||||
/// <summary>
|
||||
/// End-to-end tests for the prod-captured globals path: SeedGlobalsAsync invokes
|
||||
/// SVSim.Bootstrap.GlobalsImporter against the test SQLite DB, then we verify each
|
||||
/// End-to-end tests for the seed-driven globals path: SeedGlobalsAsync runs the per-domain
|
||||
/// importers against the test SQLite DB, then we verify each
|
||||
/// IGlobalsRepository method returns the expected count + a spot-checked field value.
|
||||
///
|
||||
/// Counts come from the 2026-05-23 prod capture; if a recapture lands with different cardinalities,
|
||||
|
||||
Reference in New Issue
Block a user