From a428effe5f0788619724929b28e0e57711f2b1c3 Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Wed, 24 Jan 2024 12:50:42 +0100 Subject: [PATCH] Expect to find CWE on any, not all Maven vulnerabilities --- .../java/dependencies/DependencyVulnerabilityCheckTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheckTest.java b/src/test/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheckTest.java index e7bfd41..8706296 100644 --- a/src/test/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheckTest.java +++ b/src/test/java/org/openrewrite/java/dependencies/DependencyVulnerabilityCheckTest.java @@ -79,7 +79,7 @@ void maven() { .dataTable(VulnerabilityReport.Row.class, rows -> { assertThat(rows).isNotEmpty(); assertThat(rows).filteredOn(VulnerabilityReport.Row::isFixWithVersionUpdateOnly).isNotEmpty(); - assertThat(rows).extracting(VulnerabilityReport.Row::getCWEs).allSatisfy(cwes -> assertThat(cwes).isNotEmpty()); + assertThat(rows).extracting(VulnerabilityReport.Row::getCWEs).anySatisfy(cwes -> assertThat(cwes).isNotEmpty()); }), //language=xml pomXml(