feat(zgw): docker OpenZaak integration-test harness (WP-54)

Opt-in docker-compose (postgres+redis+OpenZaak, no celery/nginx) +
bootstrap-catalogus.sh seed a real OpenZaak instance; OpenZaakIntegrationTests
(Category=Integration, excluded from default dotnet test/CI) proves the ZGW
seam against it for the first time. That live run caught a real bug:
ZgwHttpClient never sent Content-Crs/Accept-Crs headers, so every write would
412 against a spec-compliant OpenZaak — fixed alongside the harness.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
eho
2026-07-30 09:08:35 +02:00
co-authored by Claude Sonnet 5
parent 73172510ea
commit 5cb3e1a9f0
12 changed files with 471 additions and 15 deletions
@@ -38,5 +38,11 @@ internal sealed class ZgwHttpClient(HttpClient http, ZgwTokenProvider tokens)
{
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", caller is null ? tokens.Mint() : tokens.Mint(caller));
req.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
// Every ZGW request must declare a coordinate reference system, even when no geometry is
// involved (Zaak has an optional zaakgeometrie) — a real OpenZaak 412s ("Content-Crs
// header ontbreekt") without it. Only surfaced by WP-54's live harness: the fixture/stub
// tests never modelled this header, so this bug shipped unnoticed since WP-49/50.
req.Headers.Add("Accept-Crs", "EPSG:4326");
if (req.Content is not null) req.Content.Headers.Add("Content-Crs", "EPSG:4326");
}
}