Check combined output of successful and failed scans
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?
Changelog entry added-
Documentation created/updated for GitLab EE, if necessary -
Documentation created/updated for this project, if necessary -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Job definition updated, if necessary -
Conforms to the code review guidelines -
Conforms to the Go guidelines -
Security reports checked/validated by reviewer
Edited by Fabien Catteau