Replace 'report with scanned files' shared example with 'recorded report' example in dependency scanning image tests

Proposal

As discussed here, we should remove the report with scanned files shared examples from the integration-test project and use the recorded report shared example in the image integration tests instead.

The report with scanned files shared example is problematic for the following reasons:

  1. It assumes that all the dependency files being scanned have vulnerabilities. This requires additional work to fix, which is described in Update shared examples of integration test proj... (#354079 - closed)
  2. It often duplicates existing tests, like this example which duplicates this test
  3. When it doesn't duplicate existing tests, it still leads to additional code such as this test
  4. It's confusing - we can obtain the necessary coverage by using recorded report, which will compare the actual report with an expected report.

Implementation Plan

  1. Remove report with scanned files shared examples from the integration-test project

  2. Replace all occurrences of it_behaves_like "report with scanned files" with it_behaves_like "recorded report" in the following image specs:

  3. Replace the following workarounds and extra tests with it_behaves_like "recorded report":

/cc @fcatteau @gonzoyumo @sam.white

Edited by Adam Cohen