Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Kowalleck <[email protected]>
  • Loading branch information
jkowalleck committed Jan 22, 2025
1 parent 9f5b308 commit 4abbe2f
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 7 deletions.
36 changes: 36 additions & 0 deletions tools/src/test/resources/1.7/valid-license-choice-1.7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"$schema": "http://cyclonedx.org/schema/bom-1.7.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.7",
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
"version": 1,
"components": [
{
"type": "application",
"publisher": "Acme Inc",
"group": "com.acme",
"name": "tomcat-catalina",
"version": "9.0.14",
"description": "Modified version of Apache Catalina",
"scope": "required",
"licenses": [
{
"license": {
"id": "Apache-2.0"
}
},
{
"expression": "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0"
},
{
"license": {
"name": "My Own License",
"text": {
"content": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
}
}
}
]
}
]
}
34 changes: 34 additions & 0 deletions tools/src/test/resources/1.7/valid-license-choice-1.7.textproto
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# proto-file: schema/bom-1.7.proto
# proto-message: Bom

# All license posture in here is for show-case ony.
# This is not a real law-case!

spec_version: "1.7"
serial_number: "urn:uuid:b1ef52c6-7cd8-43d5-9e42-5e69044bbe9e"
version: 1
components {
type: CLASSIFICATION_APPLICATION
publisher: "Acme Inc"
group: "com.acme"
name: "tomcat-catalina"
version: "9.0.14"
description: "Modified version of Apache Catalina"
scope: SCOPE_REQUIRED
licenses {
license: {
id: "Apache-2.0"
}
}
licenses {
expression: "EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0"
}
licenses {
license: {
name: "My Own License"
text: {
value: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0"?>
<bom serialNumber="urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79" version="1" xmlns="http://cyclonedx.org/schema/bom/1.7">
<bom xmlns="http://cyclonedx.org/schema/bom/1.7"
serialNumber="urn:uuid:b1ef52c6-7cd8-43d5-9e42-5e69044bbe9e"
version="1"
>
<components>
<component type="application">
<publisher>Acme Inc</publisher>
Expand All @@ -8,17 +11,15 @@
<version>9.0.14</version>
<description>Modified version of Apache Catalina</description>
<scope>required</scope>
<hashes>
<hash alg="MD5">3942447fac867ae5cdb3229b658f4d48</hash>
<hash alg="SHA-1">e6b1000b94e835ffd37f4c6dcbdad43f4b48a02a</hash>
<hash alg="SHA-256">f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b</hash>
<hash alg="SHA-512">e8f33e424f3f4ed6db76a482fde1a5298970e442c531729119e37991884bdffab4f9426b7ee11fccd074eeda0634d71697d6f88a460dce0ac8d627a29f7d1282</hash>
</hashes>
<licenses>
<license>
<id>Apache-2.0</id>
</license>
<expression>EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0</expression>
<license>
<name>My Own License</name>
<text><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.]]></text>
</license>
</licenses>
<purl>pkg:maven/com.acme/[email protected]?packaging=jar</purl>
</component>
Expand Down

0 comments on commit 4abbe2f

Please sign in to comment.