Fix classification of custom licenses in License Compliance
What does this MR do and why?
Fix for #285120 (closed)
Custom licenses that are not listed in spdx index do not appear on Pipeline Policy tab. That happens because such licenses are added to database by their name, but referenced in the scanning report by id. This MR fixes that as well as introduces small refactoring for its test suit.
Screenshots or screen recordings
These are strongly recommended to assist reviewers and reduce the time to merge your change.
Example of the bug https://gitlab.com/brytannia/test-license-test/-/pipelines/383274955/licenses
Fix:
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
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.
Related to #285120 (closed)