Skip to content

Commit

Permalink
fix(spdx): rename describes field in spdx (#3102)
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Nov 13, 2022
1 parent df9cf88 commit 6da148c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pkg/sbom/spdx/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const (
PropertyLayerDigest = "LayerDigest"

RelationShipContains = "CONTAINS"
RelationShipDescribe = "DESCRIBE"
RelationShipDescribe = "DESCRIBES"
RelationShipDependsOn = "DEPENDS_ON"

ElementOperatingSystem = "OperatingSystem"
Expand Down
10 changes: 5 additions & 5 deletions pkg/sbom/spdx/marshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func TestMarshaler_Marshal(t *testing.T) {
{
RefA: spdx.DocElementID{ElementRefID: "DOCUMENT"},
RefB: spdx.DocElementID{ElementRefID: "ContainerImage-9396d894cd0cb6cb"},
Relationship: "DESCRIBE",
Relationship: "DESCRIBES",
},
{
RefA: spdx.DocElementID{ElementRefID: "ContainerImage-9396d894cd0cb6cb"},
Expand Down Expand Up @@ -400,7 +400,7 @@ func TestMarshaler_Marshal(t *testing.T) {
{
RefA: spdx.DocElementID{ElementRefID: "DOCUMENT"},
RefB: spdx.DocElementID{ElementRefID: "ContainerImage-413bfede37ad01fc"},
Relationship: "DESCRIBE",
Relationship: "DESCRIBES",
},
{
RefA: spdx.DocElementID{ElementRefID: "ContainerImage-413bfede37ad01fc"},
Expand Down Expand Up @@ -498,7 +498,7 @@ func TestMarshaler_Marshal(t *testing.T) {
{
RefA: spdx.DocElementID{ElementRefID: "DOCUMENT"},
RefB: spdx.DocElementID{ElementRefID: "Filesystem-5af0f1f08c20909a"},
Relationship: "DESCRIBE",
Relationship: "DESCRIBES",
},
{
RefA: spdx.DocElementID{ElementRefID: "Filesystem-5af0f1f08c20909a"},
Expand Down Expand Up @@ -590,7 +590,7 @@ func TestMarshaler_Marshal(t *testing.T) {
{
RefA: spdx.DocElementID{ElementRefID: "DOCUMENT"},
RefB: spdx.DocElementID{ElementRefID: "Repository-7cb7a269a391a798"},
Relationship: "DESCRIBE",
Relationship: "DESCRIBES",
},
{
RefA: spdx.DocElementID{ElementRefID: "Repository-7cb7a269a391a798"},
Expand Down Expand Up @@ -637,7 +637,7 @@ func TestMarshaler_Marshal(t *testing.T) {
{
RefA: spdx.DocElementID{ElementRefID: "DOCUMENT"},
RefB: spdx.DocElementID{ElementRefID: "Filesystem-70f34983067dba86"},
Relationship: "DESCRIBE",
Relationship: "DESCRIBES",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion pkg/sbom/spdx/testdata/happy/bom.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
"relationships": [
{
"relatedSpdxElement": "SPDXRef-ContainerImage-b5d81cde5f95c8fc",
"relationshipType": "DESCRIBE",
"relationshipType": "DESCRIBES",
"spdxElementId": "SPDXRef-DOCUMENT"
},
{
Expand Down

0 comments on commit 6da148c

Please sign in to comment.