Skip to content

Check combined output of successful and failed scans

Fabien Catteau requested to merge image-test-check-combined-output into master

What does this MR do?

Check combined output of successful and failed scans:

  • successful scans log no error/fatal messages
  • failed scans do log error/fatal messages

The latter is valuable when the analyzer crashes when it should report an error. Also, it makes it easier to debug and fix the specs when the analyzer isn't called properly. This needs emerged when working on !214 (merged), because Shell scripts introduced in this other MR are quite complex, and they were not easy to debug due to the lack of output.

Struct.new is used to create the scan Result class, and scan_shared_examples.rb now uses instances of that class. This clarifies the contract between the shared example and the spec using it: it checks a scan object that exposes a report_path, an exit_code, and a combined_output.

What are the relevant issue numbers?

gitlab-org/gitlab#333829 (closed)

Does this MR meet the acceptance criteria?

Edited by Fabien Catteau

Merge request reports