Fase B2: ASF-testproject opgeheven; tests verhuisd naar de master-Api (geen testverlies, 18 -> 18)

Tellijst Api.AndreaSlopFotografie.Tests (18):
- HostConfigurationTests (7) -> Api.Tests/SiteContractTests: NoIndex (beide sites), StrictSite+padbeleid, https-only site-origins,
  geen geheimen (beide), Contact uit + SiteId (beide), 'ASF zonder Master' (nu exacte modulelijst per csproj), mail uit (beide) + logo-urls.
- HostPipelineTests (7) -> Api.Tests: AsfVariantPipelineTests (health, setup/status, 404+CSP+noindex, robots; master-host met
  de gedragsinstellingen van ASF) en OfferingsOnTheMasterHostTests (capabilities, banner 204, migraties == model).
- ContactHostTests (4) -> Contact.Tests/Pipeline/SiteVariantContactTests (defaults dicht, poort + SiteId andreaslop, proxy bekend/onbekend).
Nieuw: sitecontract per site (modules, Website:Mode, Program.cs dun), WebsiteModeSelection (modus eenmalig bepaald),
Api.Tests serieel (MySql.Data).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 15:07:52 +01:00
co-authored by Claude Sonnet 5.5
parent ca46ce2e75
commit 612263e828
13 changed files with 408 additions and 331 deletions
+2 -1
View File
@@ -60,6 +60,7 @@ public static class CmsHost
builder.Services.AddCmsObservability(builder.Configuration);
var websiteMode = options.ResolveWebsiteMode(builder.Configuration);
builder.Services.AddSingleton(new WebsiteModeSelection(websiteMode));
if (websiteMode == WebsiteMode.PrerenderedPages)
{
builder.Services.AddCmsWebsite(builder.Configuration);
@@ -97,7 +98,7 @@ public static class CmsHost
/// </summary>
public static void ConfigurePipeline(WebApplication app, ModuleOrchestrator orchestrator, CmsHostOptions options)
{
var websiteMode = options.ResolveWebsiteMode(app.Configuration);
var websiteMode = app.Services.GetService<WebsiteModeSelection>()?.Mode ?? options.ResolveWebsiteMode(app.Configuration);
// Bring the Core schema up to date before serving any traffic. Runs before the module
// middleware below, because the Data Protection keys table lives in this context and the
// modules resolve an IDataProtector as soon as they start. Fails fast: a host that cannot
@@ -24,6 +24,14 @@ public enum WebsiteMode
/// <see cref="CmsHost.ConfigurePipeline"/>, is how a Client project opts into different behaviour.
/// Defaults reproduce the behaviour every existing Client project already has.
/// </remarks>
/// <summary>The website mode this host started with, decided once while the services were registered.</summary>
/// <remarks>
/// The pipeline reads this instead of resolving the mode a second time, so the registered services and the
/// pipeline can never disagree about the mode (a half-configured host that registers SPA services but runs the
/// prerendered pipeline would fail on its first request).
/// </remarks>
public sealed record WebsiteModeSelection(WebsiteMode Mode);
public sealed class CmsHostOptions
{
/// <summary>