Add unit test for license scanning
What does this MR do and why?
We tried to fix a bug related to the license category in the License compliance widget in MR !130244 (merged).
The MR !130244 (merged) changed the approval_status
of licenses under certain conditions. These changes blocked some MRs, and we reverted them.
Before adding the changes of MR !130244 (merged) back, we want to add additional unit tests for the license scanning feature.
This MR adds specs to the following files:
ee/spec/services/ci/compare_license_scanning_reports_service_spec.rb
These specs did not check the approval status from the license report.
These additional checks cover the scenarios in which we could classify a license as denied
instead of uncategorized
.
ee/spec/models/merge_request_spec.rb
These specs the changes merge_request.has_denied_policies?
Changed from false to true
These additional checks cover the scenarios where has_denied_policies?
returns true
instead of false
.
Related to #430910 (closed)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.