Files
prowler/mcp_server/tests
Rubén De la Torre Vico 19c8a6bbb5 test(mcp): cover the integrations tools and models
Add 51 tests over the mock HTTP router for the integrations tools and models,
pinning the connection-check choreography on create/update, the provider-id
validation per integration type, and the Jira dispatch retry safety.

Changes the tests drove out:

- 'prowler_list_integrations' stops requesting the 'configuration' field it
  discards, now that the API tolerates a sparse fieldset without it.
- 'JiraDispatchResult.from_task_result' owns the 'result is not an object'
  guard instead of duplicating it at the call site.
- 'prowler_update_integration' reads the current integration through
  'DetailedIntegration' rather than poking at the raw JSON:API payload, and
  refetches once after the PATCH instead of on each branch.
- The JSON:API providers linkage is built by one '_providers_relationship'
  helper shared by create and update.
- 'MockRouter.json_body()' lets tests assert on the document actually sent,
  since the API silently ignores attributes it does not recognise.
2026-08-05 10:42:25 +02:00
..