@@ -47,6 +47,10 @@ func TestSBOM(t *testing.T) {
47
47
want .Results [0 ].Vulnerabilities [0 ].PkgIdentifier .BOMRef = "pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64&distro=centos-7.6.1810"
48
48
want .Results [0 ].Vulnerabilities [1 ].PkgIdentifier .BOMRef = "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"
49
49
want .Results [0 ].Vulnerabilities [2 ].PkgIdentifier .BOMRef = "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"
50
+
51
+ // SBOM file doesn't contain info about layers
52
+ want .Metadata .Size = 0
53
+ want .Metadata .Layers = nil
50
54
},
51
55
},
52
56
{
@@ -96,6 +100,10 @@ func TestSBOM(t *testing.T) {
96
100
want .Results [0 ].Vulnerabilities [0 ].PkgIdentifier .BOMRef = "pkg:rpm/centos/bash@4.2.46-31.el7?arch=x86_64&distro=centos-7.6.1810"
97
101
want .Results [0 ].Vulnerabilities [1 ].PkgIdentifier .BOMRef = "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"
98
102
want .Results [0 ].Vulnerabilities [2 ].PkgIdentifier .BOMRef = "pkg:rpm/centos/openssl-libs@1.0.2k-16.el7?arch=x86_64&epoch=1&distro=centos-7.6.1810"
103
+
104
+ // SBOM file doesn't contain info about layers
105
+ want .Metadata .Size = 0
106
+ want .Metadata .Layers = nil
99
107
},
100
108
},
101
109
{
@@ -112,6 +120,10 @@ func TestSBOM(t *testing.T) {
112
120
113
121
require .Len (t , got .Results , 1 )
114
122
want .Results [0 ].Target = "testdata/fixtures/sbom/centos-7-spdx.txt (centos 7.6.1810)"
123
+
124
+ // SBOM file doesn't contain info about layers
125
+ want .Metadata .Size = 0
126
+ want .Metadata .Layers = nil
115
127
},
116
128
},
117
129
{
@@ -128,6 +140,10 @@ func TestSBOM(t *testing.T) {
128
140
129
141
require .Len (t , got .Results , 1 )
130
142
want .Results [0 ].Target = "testdata/fixtures/sbom/centos-7-spdx.json (centos 7.6.1810)"
143
+
144
+ // SBOM file doesn't contain info about layers
145
+ want .Metadata .Size = 0
146
+ want .Metadata .Layers = nil
131
147
},
132
148
},
133
149
{
0 commit comments