Closed 2000rosser closed 4 days ago
Coverage variation | Diff coverage |
---|---|
:white_check_mark: +0.02% (target: -1.00%) | :x: 66.67% (target: 70.00%) |
:rocket: Don’t miss a bit, follow what’s new on Codacy.
Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more
I actually don't think the unit test I added is necessary, will remove it.
Thanks @2000rosser!
Do you think you could add a test for this scenario here? https://github.com/DependencyTrack/dependency-track/blob/master/src/test/java/org/dependencytrack/resources/v1/BomResourceTest.java
Have a look at the existing export tests, and either extend them or add a smaller test case that's scoped to only this problem.
We want to ensure that, given a component with custom license, the exported BOM looks like expected (assertThatJson
...), and passes schema validation (assertThatNoException().isThrownBy(() -> CycloneDxValidator.getInstance().validate(jsonResponse.getBytes()));
).
@nscuro Sure, I'll take a look and add a test for it
Description
A valid SPDX is required when using the ID field for licenses. If the license is a custom license, use the name field instead.
Addressed Issue
3897
Checklist