yavsc/src/Yavsc.Org.Tests
Paul Schneider d58fad552a Test host: bind Kestrel to Site:Authority instead of dynamic port
The Yavsc.Org integration tests were failing 'Internal Server Error' on
the OIDC discovery document when run as part of the full test suite.

Root cause: WebHostFixture bound Kestrel to IPAddress.Loopback on a
dynamically-allocated port and exposed it via IServerAddressesFeature.
But the OIDC issuer URLs (and the issuer claim) come from Site:Authority,
which was left at the production value (mercure.pschneider.fr). So
IdentityServer8's discovery document advertised URLs unreachable from
the test process, and the discovery call returned a 500.

Fix:
  - WebServerFixture now overrides Site:Authority and Site:ExternalUrl
    in AddInMemoryCollection to 'https://localhost:44300' (the ASP.NET
    Core dev HTTPS convention).
  - WebHostFixture reads Site:Authority from configuration and binds
    Kestrel to that fixed URL. The exposed Addresses list is sourced
    from the same configuration value instead of the
    IServerAddressesFeature, so the listen URL and the OIDC issuer
    URLs always match.

Remoting.cs (Mandatory/Remoting.cs): add 'using
Microsoft.Extensions.DependencyInjection;' so the existing OIDC/DB
diagnostic block (capture raw HTTP response + dump OIDC-related DB
state on discovery failure) compiles. The diagnostic itself is left
in place — it's what surfaced the 500 in the first place.
2026-07-12 03:43:22 +01:00
..
Controllers ApplicationDbContext: drop redundant HasOne on 3 Client navs 2026-07-12 02:39:13 +01:00
Fakes Introduce Yavsc.Interfaces.ISmtpClient and a recording test fake 2026-06-22 02:09:02 +01:00
Mandatory Test host: bind Kestrel to Site:Authority instead of dynamic port 2026-07-12 03:43:22 +01:00
NonRegression Blog: add test guarding the display-template fix + document test architecture 2026-07-11 19:59:03 +01:00
Resources Relocate test project: test/yavscTests -> src/Yavsc.Org.Tests 2026-06-19 17:52:54 +01:00
Smoke tests: smoke tests for Account and Blog BCs 2026-06-27 21:03:16 +01:00
appsettings.json Relocate test project: test/yavscTests -> src/Yavsc.Org.Tests 2026-06-19 17:52:54 +01:00
ComputeKidTests.cs test(yavsc.org): cover the kid derivation in ComputeKid 2026-07-09 20:28:58 +01:00
Directory.Packages.props refactor: extract WebHostFixture + TestAuthPolicyProvider to shared lib 2026-07-06 21:33:57 +01:00
DumpHtml.cs refactoring 2026-06-19 19:59:15 +01:00
EstimateSignatureFileHelperTests.cs feat(api): POST /api/bill/estimate/{id}/sign — JSON signature capture 2026-07-04 15:47:55 +01:00
StaticAssetsPathsTests.cs fix(client-controller): single constructor with IHtmlLocalizer 2026-06-21 21:14:20 +01:00
test.runsettings fix(client-controller): single constructor with IHtmlLocalizer 2026-06-21 21:14:20 +01:00
TestUserMiddleware.cs refactor: extract WebHostFixture + TestAuthPolicyProvider to shared lib 2026-07-06 21:33:57 +01:00
TestUserStartupFilter.cs test(client): refactor InjectTestUser as a real IMiddleware 2026-06-21 21:24:44 +01:00
TestWebApplicationFactory.cs Revert "repoduces the bug" 2026-07-11 22:17:58 +01:00
WebServerFixture.cs Test host: bind Kestrel to Site:Authority instead of dynamic port 2026-07-12 03:43:22 +01:00
xunit.runner.json Relocate test project: test/yavscTests -> src/Yavsc.Org.Tests 2026-06-19 17:52:54 +01:00
Yavsc.Org.Tests.csproj Revert "repoduces the bug" 2026-07-11 22:17:58 +01:00