NEO-38: set integration test host to Testing for deterministic JSON errors

pull/72/head
VinPropane 2026-05-06 22:34:26 -04:00
parent b2999f3ed9
commit ad9259c308
2 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,8 @@ public sealed class PostgresWebApplicationFactory : WebApplicationFactory<Progra
"Set ConnectionStrings__NeonSprawl for Postgres integration tests (see server/README.md).");
}
builder.UseEnvironment("Testing");
var skillsDir = SkillCatalogPathResolution.TryDiscoverSkillsDirectory(AppContext.BaseDirectory)
?? throw new InvalidOperationException(
"Could not discover repo content/skills from AppContext.BaseDirectory; run tests from the neon-sprawl clone.");

View File

@ -19,6 +19,10 @@ public sealed class InMemoryWebApplicationFactory : WebApplicationFactory<Progra
protected override void ConfigureWebHost(IWebHostBuilder builder)
{
// Avoid Development + DeveloperExceptionPage: invalid JSON / binding failures must stay 400 for API tests,
// and Release CI runs rely on deterministic status codes (e.g. HotbarLoadoutApiTests malformed-body case).
builder.UseEnvironment("Testing");
var skillsDir = SkillCatalogPathResolution.TryDiscoverSkillsDirectory(AppContext.BaseDirectory)
?? throw new InvalidOperationException(
"Could not discover repo content/skills from AppContext.BaseDirectory; run tests from the neon-sprawl clone.");