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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user