Skip to content

Commit

Permalink
Fix type issue in SBOM integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
rudsberg committed Jan 20, 2025
1 parent 0d77824 commit 52ab881
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,12 @@ class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest {
assert mainComponentDependency.get('dependsOn').isEmpty()
// Check that the main component is not found in "components"
assert !rootNode.get('components').any { it.get('bom-ref').asText() == mainComponentId }
assert !rootNode.get('components').any { component ->
def bomRef = component.get('bom-ref')
assert bomRef : "Component '${component}' has no 'bom-ref' field"
def bomRefValue = bomRef instanceof String ? bomRef : bomRef.asText()
bomRefValue == mainComponentId
}
return true
} catch (AssertionError | Exception e) {
Expand Down

0 comments on commit 52ab881

Please sign in to comment.