mirror of
https://github.com/anchore/syft.git
synced 2026-08-19 16:48:27 +02:00
parent
aff2c247db
commit
8ed534c32b
@ -221,6 +221,11 @@ var defaultCandidateAdditions = buildCandidateLookup(
|
|||||||
candidateKey{PkgName: "mustache"},
|
candidateKey{PkgName: "mustache"},
|
||||||
candidateAddition{AdditionalProducts: []string{"mustache.js"}},
|
candidateAddition{AdditionalProducts: []string{"mustache.js"}},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
pkg.NpmPkg,
|
||||||
|
candidateKey{PkgName: "redis"},
|
||||||
|
candidateAddition{AdditionalVendors: []string{"redis.js"}},
|
||||||
|
},
|
||||||
|
|
||||||
// Gem packages
|
// Gem packages
|
||||||
{
|
{
|
||||||
|
|||||||
@ -147,6 +147,14 @@ func Test_additionalVendors(t *testing.T) {
|
|||||||
vendor: "my-vendor",
|
vendor: "my-vendor",
|
||||||
expected: []string{"awesome-vendor-addition", "one-good-addition", "another-good-addition"},
|
expected: []string{"awesome-vendor-addition", "one-good-addition", "another-good-addition"},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "default additionsnpm redis gets redisjs vendor",
|
||||||
|
allAdditions: defaultCandidateAdditions,
|
||||||
|
ty: pkg.NpmPkg,
|
||||||
|
pkgName: "redis",
|
||||||
|
vendor: "redis",
|
||||||
|
expected: []string{"redis.js"},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
t.Run(test.name, func(t *testing.T) {
|
t.Run(test.name, func(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user