mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 16:33:21 +01:00
tests: account for epoch in dedupe test
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
This commit is contained in:
parent
bcd47d109a
commit
b702952c8c
@ -87,6 +87,7 @@ func TestPkgCoverageImage(t *testing.T) {
|
|||||||
definedPkgs.Remove(string(pkg.TerraformPkg))
|
definedPkgs.Remove(string(pkg.TerraformPkg))
|
||||||
definedPkgs.Remove(string(pkg.PhpPeclPkg)) // we have coverage for pear instead
|
definedPkgs.Remove(string(pkg.PhpPeclPkg)) // we have coverage for pear instead
|
||||||
definedPkgs.Remove(string(pkg.CondaPkg))
|
definedPkgs.Remove(string(pkg.CondaPkg))
|
||||||
|
definedPkgs.Remove(string(pkg.ModelPkg))
|
||||||
|
|
||||||
var cases []testCase
|
var cases []testCase
|
||||||
cases = append(cases, commonTestCases...)
|
cases = append(cases, commonTestCases...)
|
||||||
@ -161,6 +162,7 @@ func TestPkgCoverageDirectory(t *testing.T) {
|
|||||||
definedPkgs.Remove(string(pkg.UnknownPkg))
|
definedPkgs.Remove(string(pkg.UnknownPkg))
|
||||||
definedPkgs.Remove(string(pkg.CondaPkg))
|
definedPkgs.Remove(string(pkg.CondaPkg))
|
||||||
definedPkgs.Remove(string(pkg.PhpPeclPkg)) // this is covered as pear packages
|
definedPkgs.Remove(string(pkg.PhpPeclPkg)) // this is covered as pear packages
|
||||||
|
definedPkgs.Remove(string(pkg.ModelPkg))
|
||||||
|
|
||||||
// for directory scans we should not expect to see any of the following package types
|
// for directory scans we should not expect to see any of the following package types
|
||||||
definedPkgs.Remove(string(pkg.KbPkg))
|
definedPkgs.Remove(string(pkg.KbPkg))
|
||||||
|
|||||||
@ -30,10 +30,10 @@ func TestPackageDeduplication(t *testing.T) {
|
|||||||
locationCount: map[string]int{
|
locationCount: map[string]int{
|
||||||
"basesystem-11-13.el9": 5, // in all layers
|
"basesystem-11-13.el9": 5, // in all layers
|
||||||
"curl-minimal-7.76.1-26.el9_3.2.0.1": 2, // base + wget layer
|
"curl-minimal-7.76.1-26.el9_3.2.0.1": 2, // base + wget layer
|
||||||
"curl-minimal-7.76.1-31.el9": 3, // curl upgrade layer + all above layers
|
"curl-minimal-7.76.1-31.el9_6.1": 3, // curl upgrade layer + all above layers
|
||||||
"wget-1.21.1-8.el9_4": 4, // wget + all above layers
|
"wget-1.21.1-8.el9_4": 4, // wget + all above layers
|
||||||
"vsftpd-3.0.5-6.el9": 2, // vsftpd + all above layers
|
"vsftpd-3.0.5-6.el9": 2, // vsftpd + all above layers
|
||||||
"httpd-2.4.62-4.el9": 1, // last layer
|
"httpd-2.4.62-4.el9_6.4": 1, // last layer
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -47,11 +47,11 @@ func TestPackageDeduplication(t *testing.T) {
|
|||||||
"httpd": 1, // rpm, binary is now excluded by overlap
|
"httpd": 1, // rpm, binary is now excluded by overlap
|
||||||
},
|
},
|
||||||
locationCount: map[string]int{
|
locationCount: map[string]int{
|
||||||
"basesystem-11-13.el9": 1,
|
"basesystem-11-13.el9": 1,
|
||||||
"curl-minimal-7.76.1-31.el9": 1, // upgrade
|
"curl-minimal-7.76.1-31.el9_6.1": 1, // upgrade
|
||||||
"wget-1.21.1-8.el9_4": 1,
|
"wget-1.21.1-8.el9_4": 1,
|
||||||
"vsftpd-3.0.5-6.el9": 1,
|
"vsftpd-3.0.5-6.el9": 1,
|
||||||
"httpd-2.4.62-4.el9": 1,
|
"httpd-2.4.62-4.el9_6.4": 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user