From b702952c8cef7eb6bb4f0cc101ba48df6a270cad Mon Sep 17 00:00:00 2001 From: Christopher Phillips <32073428+spiffcs@users.noreply.github.com> Date: Tue, 14 Oct 2025 05:27:31 -0400 Subject: [PATCH] tests: account for epoch in dedupe test Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com> --- .../test/integration/catalog_packages_test.go | 2 ++ .../test/integration/package_deduplication_test.go | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/cmd/syft/internal/test/integration/catalog_packages_test.go b/cmd/syft/internal/test/integration/catalog_packages_test.go index c11be21c5..8e089c20c 100644 --- a/cmd/syft/internal/test/integration/catalog_packages_test.go +++ b/cmd/syft/internal/test/integration/catalog_packages_test.go @@ -87,6 +87,7 @@ func TestPkgCoverageImage(t *testing.T) { definedPkgs.Remove(string(pkg.TerraformPkg)) definedPkgs.Remove(string(pkg.PhpPeclPkg)) // we have coverage for pear instead definedPkgs.Remove(string(pkg.CondaPkg)) + definedPkgs.Remove(string(pkg.ModelPkg)) var cases []testCase cases = append(cases, commonTestCases...) @@ -161,6 +162,7 @@ func TestPkgCoverageDirectory(t *testing.T) { definedPkgs.Remove(string(pkg.UnknownPkg)) definedPkgs.Remove(string(pkg.CondaPkg)) 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 definedPkgs.Remove(string(pkg.KbPkg)) diff --git a/cmd/syft/internal/test/integration/package_deduplication_test.go b/cmd/syft/internal/test/integration/package_deduplication_test.go index 86eb9fc91..f2586a911 100644 --- a/cmd/syft/internal/test/integration/package_deduplication_test.go +++ b/cmd/syft/internal/test/integration/package_deduplication_test.go @@ -30,10 +30,10 @@ func TestPackageDeduplication(t *testing.T) { locationCount: map[string]int{ "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-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 "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 }, locationCount: map[string]int{ - "basesystem-11-13.el9": 1, - "curl-minimal-7.76.1-31.el9": 1, // upgrade - "wget-1.21.1-8.el9_4": 1, - "vsftpd-3.0.5-6.el9": 1, - "httpd-2.4.62-4.el9": 1, + "basesystem-11-13.el9": 1, + "curl-minimal-7.76.1-31.el9_6.1": 1, // upgrade + "wget-1.21.1-8.el9_4": 1, + "vsftpd-3.0.5-6.el9": 1, + "httpd-2.4.62-4.el9_6.4": 1, }, }, }