File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ func componentConverter(specVersion SpecVersion) func(*Component) {
159159 c .OmniborID = nil
160160 c .Manufacturer = nil
161161 c .Authors = nil
162+ c .Tags = nil
162163 }
163164
164165 if ! specVersion .supportsComponentType (c .Type ) {
Original file line number Diff line number Diff line change @@ -245,3 +245,26 @@ func Test_convertAuthors(t *testing.T) {
245245 assert .Nil (t , (* bom .Components )[0 ].Authors )
246246 })
247247}
248+
249+ func Test_convertTags (t * testing.T ) {
250+ t .Run ("spec 1.5 and lower" , func (t * testing.T ) {
251+ bom := NewBOM ()
252+ bom .Metadata = & Metadata {
253+ Component : & Component {
254+ Name : "test" ,
255+ Tags : & []string {"tag1" , "tag2" },
256+ },
257+ }
258+ bom .Components = & []Component {
259+ {
260+ Name : "foo" ,
261+ Tags : & []string {"tag3" , "tag4" },
262+ },
263+ }
264+
265+ bom .convert (SpecVersion1_5 )
266+
267+ assert .Nil (t , bom .Metadata .Component .Tags )
268+ assert .Nil (t , (* bom .Components )[0 ].Tags )
269+ })
270+ }
You can’t perform that action at this time.
0 commit comments