italia/developers-italia-api

Webhooks and catalogs lack DB persistence checks for write endpoints

Open

#384 建立於 2026年5月10日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)Go (8 fork)auto 404
good first issue

倉庫指標

Star
 (16 star)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南