diff --git a/pkg/sbom/io/encode_test.go b/pkg/sbom/io/encode_test.go index 223fb0027e11..56dd0116bbdd 100644 --- a/pkg/sbom/io/encode_test.go +++ b/pkg/sbom/io/encode_test.go @@ -744,7 +744,7 @@ func TestEncoder_Encode(t *testing.T) { wantComponents: map[uuid.UUID]*core.Component{ uuid.MustParse(id1): &libComponent, }, - wantRels: map[uuid.UUID][]core.Relationship{}, + wantRels: make(map[uuid.UUID][]core.Relationship), wantVulns: map[uuid.UUID][]core.Vulnerability{ uuid.MustParse(id1): { {