Skip to content

Commit 8dc65ed

Browse files
committed
tests: style
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent f741f70 commit 8dc65ed

File tree

62 files changed

+1598
-1759
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+1598
-1759
lines changed

tools/src/test/resources/1.7/invalid-citations-1.7.textproto

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,42 @@ spec_version: "1.7"
55
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
66
version: 1
77

8-
metadata {
9-
timestamp {
8+
metadata: {
9+
timestamp: {
1010
seconds: 1754424907
1111
nanos: 0
1212
}
1313
}
1414

15-
components {
15+
components: {
1616
type: CLASSIFICATION_LIBRARY
1717
bom_ref: "component-1"
1818
name: "example-lib"
1919
version: "1.2.3"
20-
licenses {
21-
license {
20+
licenses: {
21+
license: {
2222
id: "Apache-2.0"
2323
}
2424
}
2525
}
2626

2727
## !! NO formal check possible
28-
#citations {
28+
#citations: {
2929
# bom_ref: "citation-1"
3030
# pointers: { pointer: "/components/0/name" }
31-
# timestamp {
31+
# timestamp: {
3232
# seconds: 1746108000
3333
# nanos: 0
3434
# }
3535
# note: "Should have at least one of the following property sets: property 'attributedTo' or property 'process'"
3636
#}
3737

3838

39-
citations {
39+
citations: {
4040
bom_ref: "citation-1"
4141
pointers: { pointer: "/components/0/name" }
4242
expressions: { expression: "$..[?(bom_ref=='component-1')].version" }
43-
timestamp {
43+
timestamp: {
4444
seconds: 1746108000
4545
nanos: 0
4646
}

tools/src/test/resources/1.7/invalid-license-missing-id-and-name-1.7.textproto

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
spec_version: "1.7"
55
version: 1
66
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
7-
components {
7+
components: {
88
type: CLASSIFICATION_LIBRARY
99
name: "license-with-no-id-nor-name"
1010
version: "23"
1111
description: "testcase for issue#288"
12-
licenses {
13-
license { }
12+
licenses: {
13+
license: { }
1414
}
1515
}

tools/src/test/resources/1.7/invalid-properties-1.7.textproto

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,45 +4,45 @@
44
spec_version: "1.7"
55
version: 1
66
serial_number: "urn:uuid:bcb403ae-91fa-436e-bc93-84d1078cdeed"
7-
metadata {
8-
properties {
7+
metadata: {
8+
properties: {
99
value: "missing a name"
1010
}
11-
properties {
11+
properties: {
1212
# no name and no value
1313
}
1414
}
15-
components {
15+
components: {
1616
type: CLASSIFICATION_LIBRARY
1717
name: "acme-library"
1818
version: "1.0.0"
19-
licenses {
20-
license {
19+
licenses: {
20+
license: {
2121
id: "Apache-2.0"
22-
properties {
22+
properties: {
2323
value: "missing a name"
2424
}
25-
properties {
25+
properties: {
2626
# no name and no value
2727
}
2828
}
2929
}
30-
properties {
30+
properties: {
3131
value: "missing a name"
3232
}
33-
properties {
33+
properties: {
3434
# no name and no value
3535
}
3636
}
37-
services {
37+
services: {
3838
bom_ref: "b2a46a4b-8367-4bae-9820-95557cfe03a8"
3939
group: "org.partner"
4040
name: "Stock ticker service"
4141
endpoints: "https://partner.org/api/v1/stock"
42-
properties {
42+
properties: {
4343
value: "missing a name"
4444
}
45-
properties {
45+
properties: {
4646
# no name and no value
4747
}
4848
}

tools/src/test/resources/1.7/valid-annotation-1.7.textproto

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,73 +4,73 @@
44
spec_version: "1.7"
55
version: 1
66
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
7-
components {
7+
components: {
88
type: CLASSIFICATION_LIBRARY
99
bom_ref: "component-a"
1010
name: "Component A"
1111
version: "1.0.0"
1212
}
13-
annotations {
13+
annotations: {
1414
bom_ref: "annotation-1"
1515
subjects: "component-a"
1616
annotator: {
1717
organization: {
1818
name: "Acme, Inc."
1919
url: "https://example.com"
20-
contact {
20+
contact: {
2121
name: "Acme Professional Services"
2222
email: "professional.services@example.com"
2323
}
2424
}
2525
}
26-
timestamp {
26+
timestamp: {
2727
seconds: 1640995200
2828
nanos: 0
2929
}
3030
text: "This is a sample annotation made by an organization"
3131
}
32-
annotations {
32+
annotations: {
3333
bom_ref: "annotation-2"
3434
subjects: "component-a"
3535
annotator: {
36-
individual {
36+
individual: {
3737
name: "Samantha Wright"
3838
email: "samantha.wright@example.com"
3939
phone: "800-555-1212"
4040
}
4141
}
42-
timestamp {
42+
timestamp: {
4343
seconds: 1640995200
4444
nanos: 0
4545
}
4646
text: "This is a sample annotation made by a person"
4747
}
48-
annotations {
48+
annotations: {
4949
bom_ref: "annotation-3"
5050
subjects: "component-a"
5151
annotator: {
52-
component {
52+
component: {
5353
type: CLASSIFICATION_APPLICATION
5454
name: "Awesome Tool"
5555
version: "9.1.2"
5656
}
5757
}
58-
timestamp {
58+
timestamp: {
5959
seconds: 1640995200
6060
nanos: 0
6161
}
6262
text: "This is a sample annotation made by a component"
6363
}
64-
annotations {
64+
annotations: {
6565
bom_ref: "annotation-4"
6666
subjects: "component-a"
6767
annotator: {
68-
service {
68+
service: {
6969
bom_ref: "b2a46a4b-8367-4bae-9820-95557cfe03a8"
70-
provider {
70+
provider: {
7171
name: "Partner Org"
7272
url: "https://partner.org"
73-
contact {
73+
contact: {
7474
name: "Support"
7575
email: "support@partner.org"
7676
phone: "800-555-1212"
@@ -83,13 +83,13 @@ annotations {
8383
endpoints: "https://partner.org/api/v1/annotate"
8484
authenticated: true
8585
x_trust_boundary: true
86-
data {
86+
data: {
8787
flow: DATA_FLOW_BI_DIRECTIONAL
8888
value: "public"
8989
}
9090
}
9191
}
92-
timestamp {
92+
timestamp: {
9393
seconds: 1640995200
9494
nanos: 0
9595
}

tools/src/test/resources/1.7/valid-assembly-1.7.textproto

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@
44
spec_version: "1.7"
55
version: 1
66
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
7-
components {
7+
components: {
88
type: CLASSIFICATION_LIBRARY
99
name: "acme-library-a"
1010
version: "1.0.0"
11-
components {
11+
components: {
1212
type: CLASSIFICATION_LIBRARY
1313
name: "acme-library-b"
1414
version: "2.0.0"
1515
}
1616
}
17-
services {
17+
services: {
1818
name: "acme-service-a"
19-
services {
19+
services: {
2020
name: "acme-service-b"
2121
}
2222
}

0 commit comments

Comments
 (0)