NEO-38: set integration test host to Testing for deterministic JSON errors
parent
b2999f3ed9
commit
ad9259c308
|
|
@ -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.");
|
||||
|
|
|
|||
|
|
@ -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.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue