-
-
Notifications
You must be signed in to change notification settings - Fork 583
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for supplier and manifacturer (#3090)
* melbas changes with some error fixes Signed-off-by: leec94 <[email protected]> * adding manufacturer assertions Signed-off-by: leec94 <[email protected]> * fix varchar error Signed-off-by: leec94 <[email protected]> * fix format for contact Signed-off-by: leec94 <[email protected]> * passes test Signed-off-by: leec94 <[email protected]> * formatting Signed-off-by: leec94 <[email protected]> * account for no supplier Signed-off-by: leec94 <[email protected]> * account for no metadata Signed-off-by: leec94 <[email protected]> * allow new columns to be nullable Signed-off-by: leec94 <[email protected]> --------- Signed-off-by: leec94 <[email protected]>
- Loading branch information
Showing
6 changed files
with
188 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,19 @@ public void informTest() throws Exception { | |
assertThat(components).hasSize(1); | ||
|
||
final Component component = components.get(0); | ||
|
||
assertThat(component.getSupplier().getName()).isEqualTo("Foo Incorporated"); /*Issue #2373, #2737 - Adding support for Supplier*/ | ||
assertThat(component.getSupplier().getUrls()[0]).isEqualTo("https://foo.bar.com"); | ||
assertThat(component.getSupplier().getContacts().get(0).getEmail()).isEqualTo("[email protected]"); | ||
assertThat(component.getSupplier().getContacts().get(0).getPhone()).isEqualTo("123-456-7890"); | ||
|
||
assertThat(project.getManufacturer().getName()).isEqualTo("Foo Incorporated"); | ||
assertThat(project.getManufacturer().getUrls()[0]).isEqualTo("https://foo.bar.com"); | ||
assertThat(project.getManufacturer().getContacts().get(0).getName()).isEqualTo("Foo Sr."); | ||
assertThat(project.getManufacturer().getContacts().get(0).getEmail()).isEqualTo("[email protected]"); | ||
assertThat(project.getManufacturer().getContacts().get(0).getPhone()).isEqualTo("800-123-4567"); | ||
|
||
|
||
assertThat(component.getAuthor()).isEqualTo("Sometimes this field is long because it is composed of a list of authors......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................"); | ||
assertThat(component.getPublisher()).isEqualTo("Example Incorporated"); | ||
assertThat(component.getGroup()).isEqualTo("com.example"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,15 @@ | |
<bom xmlns="http://cyclonedx.org/schema/bom/1.4" version="1"> | ||
<metadata> | ||
<component type="application" bom-ref="acme"> | ||
<supplier> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<name>Foo Jr.</name> | ||
<email>[email protected]</email> | ||
<phone>123-456-7890</phone> | ||
</contact> | ||
</supplier> | ||
<publisher>DependencyTrack</publisher> | ||
<name>Acme example</name> | ||
<externalReferences> | ||
|
@@ -19,10 +28,37 @@ | |
</reference> | ||
</externalReferences> | ||
</component> | ||
<manufacture> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<name>Foo Sr.</name> | ||
<email>[email protected]</email> | ||
<phone>800-123-4567</phone> | ||
</contact> | ||
</manufacture> | ||
<supplier> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<name>Foo Jr.</name> | ||
<email>[email protected]</email> | ||
<phone>123-456-7890</phone> | ||
</contact> | ||
</supplier> | ||
</metadata> | ||
<components> | ||
<component type="application"> | ||
<author>Sometimes this field is long because it is composed of a list of authors......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................</author> | ||
<supplier> | ||
<name>Foo Incorporated</name> | ||
<url>https://foo.bar.com</url> | ||
<contact> | ||
<name>Foo Jr.</name> | ||
<email>[email protected]</email> | ||
<phone>123-456-7890</phone> | ||
</contact> | ||
</supplier> | ||
<publisher>Example Incorporated</publisher> | ||
<group>com.example</group> | ||
<name>xmlutil</name> | ||
|