fix: more istio classifier matching (#4645)

Signed-off-by: witchcraze <witchcraze@gmail.com>
This commit is contained in:
witchcraze
2026-04-12 10:54:08 -04:00
committed by GitHub
parent cc3b8eb48f
commit e420322494
11 changed files with 162 additions and 6 deletions
@@ -1589,6 +1589,39 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
},
},
},
{
logicalFixture: "istio_pilot-discovery/1.29.0-alpha.0/linux-amd64",
expected: pkg.Package{
Name: "pilot-discovery",
Version: "1.29.0-alpha.0",
Type: "binary",
PURL: "pkg:generic/istio@1.29.0-alpha.0",
Locations: locations("pilot-discovery"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-discovery/1.29.0-beta.0/linux-amd64",
expected: pkg.Package{
Name: "pilot-discovery",
Version: "1.29.0-beta.0",
Type: "binary",
PURL: "pkg:generic/istio@1.29.0-beta.0",
Locations: locations("pilot-discovery"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-discovery/1.29.0-rc.3/linux-amd64",
expected: pkg.Package{
Name: "pilot-discovery",
Version: "1.29.0-rc.3",
Type: "binary",
PURL: "pkg:generic/istio@1.29.0-rc.3",
Locations: locations("pilot-discovery"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-discovery/1.26.8/linux-amd64",
expected: pkg.Package{
@@ -1600,6 +1633,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-discovery/1.10-dev/linux-amd64",
expected: pkg.Package{
Name: "pilot-discovery",
Version: "1.10-dev",
Type: "binary",
PURL: "pkg:generic/istio@1.10-dev",
Locations: locations("pilot-discovery"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-discovery/1.8.0/linux-amd64",
expected: pkg.Package{
@@ -1633,6 +1677,39 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-agent/1.29.0-alpha.0/linux-amd64",
expected: pkg.Package{
Name: "pilot-agent",
Version: "1.29.0-alpha.0",
Type: "binary",
PURL: "pkg:generic/istio@1.29.0-alpha.0",
Locations: locations("pilot-agent"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-agent/1.29.0-beta.0/linux-amd64",
expected: pkg.Package{
Name: "pilot-agent",
Version: "1.29.0-beta.0",
Type: "binary",
PURL: "pkg:generic/istio@1.29.0-beta.0",
Locations: locations("pilot-agent"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-agent/1.29.0-rc.3/linux-amd64",
expected: pkg.Package{
Name: "pilot-agent",
Version: "1.29.0-rc.3",
Type: "binary",
PURL: "pkg:generic/istio@1.29.0-rc.3",
Locations: locations("pilot-agent"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-agent/1.26.8/linux-amd64",
expected: pkg.Package{
@@ -1644,6 +1721,17 @@ func Test_Cataloger_PositiveCases(t *testing.T) {
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-agent/1.10-dev/linux-amd64",
expected: pkg.Package{
Name: "pilot-agent",
Version: "1.10-dev",
Type: "binary",
PURL: "pkg:generic/istio@1.10-dev",
Locations: locations("pilot-agent"),
Metadata: metadata("istio-binary"),
},
},
{
logicalFixture: "istio_pilot-agent/1.8.0/linux-amd64",
expected: pkg.Package{