italia/developers-italia-api

Webhooks and catalogs lack DB persistence checks for write endpoints

Open

#384 aperta il 10 mag 2026

Vedi su GitHub
 (0 commenti) (0 reazioni) (0 assegnatari)Go (8 fork)auto 404
good first issue

Metriche repository

Star
 (16 star)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

Most resources have endpoint tests that only verify the HTTP response, not what actually lands in the database. POST and PATCH can return 200 with the right body and still write the wrong row, and DELETE can return 204 without removing anything.

logs, publishers and software already have TestXxxPostDBChecks, TestXxxPatchDBChecks and TestXxxDeleteDBChecks (in #294 and follow-ups). Two resources are still missing equivalent coverage:

  • webhooks: no DB persistence checks for POST, PATCH or DELETE
  • catalogs: existing checks cover only catalog_sources and DELETE, nothing asserts that POST or PATCH actually persist name, alternativeId or publishersNamespace on the catalog row itself

Guida contributor