Skip to content

Update `ingest_occurrences_spec` to use real findings

What does this MR do and why?

As I am working on transitioning the sbom occurrence maps to use a new query, I would like to be able to run this spec to make sure I don't break anything.

Currently, this spec uses a double for the findings:

instance_double('Sbom::Ingestion::Vulnerabilities')

This works well for the current implementation, as the actual finding fetching logic is encapsulated in the Sbom::Ingestion::Vulnerabilities class and covered by its associated spec

With the new query, I will be moving the findings logic up to the task level, where the occurrence_maps are available to iterate over and build the query.1

Maybe this new query will also be encapsulated in a separate class, which can also be unit tested. However, I'd like to have additional coverage from existing specs to assist me with the new query

Screenshots

before after
before after

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.


epic: &11241
related to: #472760 (closed)
MR: !160015 (merged)


  1. a rough outline of the new implementation is in this thread

Edited by Michael Becker

Merge request reports

Loading