Skip to content

Commit

Permalink
test(bom): avoid overwriting UID in libComponentWithUID function
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriyLewen committed Jun 28, 2024
1 parent afb0428 commit 90f88ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/sbom/io/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"testing"

"github.com/package-url/packageurl-go"
"github.com/samber/lo"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand Down Expand Up @@ -776,9 +777,9 @@ var (
)

func libComponentWithUID() *core.Component {
component := libComponent
component := lo.FromPtr(libComponent)
component.PkgIdentifier.UID = "6C0AE96901617503"
return component
return lo.ToPtr(component)
}

func newTestBOM(t *testing.T) *core.BOM {
Expand Down

0 comments on commit 90f88ad

Please sign in to comment.