Skip to content

Commit

Permalink
Skip property assertions for legacy BOM processing task
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <[email protected]>
  • Loading branch information
nscuro committed Mar 2, 2024
1 parent c01808d commit 851f8b2
Showing 1 changed file with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,22 +238,26 @@ public void informTest() throws Exception {
assertThat(component.getCpe()).isEqualTo("cpe:/a:example:xmlutil:1.0.0");
assertThat(component.getPurl().canonicalize()).isEqualTo("pkg:maven/com.example/[email protected]?packaging=jar");
assertThat(component.getLicenseUrl()).isEqualTo("https://www.apache.org/licenses/LICENSE-2.0.txt");
assertThat(component.getProperties()).satisfiesExactly(
property -> {
assertThat(property.getGroupName()).isEqualTo("foo");
assertThat(property.getPropertyName()).isEqualTo("bar");
assertThat(property.getPropertyValue()).isEqualTo("baz");
assertThat(property.getPropertyType()).isEqualTo(PropertyType.STRING);
assertThat(property.getDescription()).isNull();
},
property -> {
assertThat(property.getGroupName()).isEqualTo("internal");
assertThat(property.getPropertyName()).isEqualTo("foo");
assertThat(property.getPropertyValue()).isEqualTo("bar");
assertThat(property.getPropertyType()).isEqualTo(PropertyType.STRING);
assertThat(property.getDescription()).isNull();
}
);

// TODO: Implement for legacy version of the task.
if (bomUploadProcessingTaskSupplier.get() instanceof BomUploadProcessingTaskV2) {
assertThat(component.getProperties()).satisfiesExactly(
property -> {
assertThat(property.getGroupName()).isEqualTo("foo");
assertThat(property.getPropertyName()).isEqualTo("bar");
assertThat(property.getPropertyValue()).isEqualTo("baz");
assertThat(property.getPropertyType()).isEqualTo(PropertyType.STRING);
assertThat(property.getDescription()).isNull();
},
property -> {
assertThat(property.getGroupName()).isEqualTo("internal");
assertThat(property.getPropertyName()).isEqualTo("foo");
assertThat(property.getPropertyValue()).isEqualTo("bar");
assertThat(property.getPropertyType()).isEqualTo(PropertyType.STRING);
assertThat(property.getDescription()).isNull();
}
);
}

assertThat(qm.getAllVulnerabilities(component)).hasSize(2);
assertThat(NOTIFICATIONS).satisfiesExactly(
Expand Down

0 comments on commit 851f8b2

Please sign in to comment.