-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Will Murphy <[email protected]>
- Loading branch information
1 parent
3ca436a
commit 74e6851
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -706,13 +706,34 @@ func Test_RemoveBinaryPackagesByOverlap(t *testing.T) { | |
[]string{"rpm:[email protected] -> apk:[email protected]"}), | ||
expectedPackages: []string{"apk:[email protected]", "rpm:[email protected]"}, | ||
}, | ||
{ | ||
name: "does not exclude if OS package owns OS package", | ||
sbom: catalogWithOverlaps( | ||
[]string{"rpm:[email protected]", "rpm:[email protected]"}, | ||
[]string{"rpm:[email protected] -> rpm:[email protected]"}), | ||
expectedPackages: []string{"apk:[email protected]", "rpm:[email protected]"}, | ||
}, | ||
{ | ||
name: "does not exclude if owning package is non-OS", | ||
sbom: catalogWithOverlaps( | ||
[]string{"python:[email protected]", "python:[email protected]"}, | ||
[]string{"python:[email protected] -> python:[email protected]"}), | ||
expectedPackages: []string{"apk:[email protected]", "rpm:[email protected]"}, | ||
}, | ||
{ | ||
name: "python bindings for system RPM install", | ||
sbom: withDistro(catalogWithOverlaps( | ||
[]string{"rpm:[email protected]", "python:[email protected]"}, | ||
[]string{"rpm:[email protected] -> python:[email protected]"}), "rhel"), | ||
expectedPackages: []string{"rpm:[email protected]"}, | ||
}, | ||
{ | ||
name: "amzn linux doesn't remove packages in this way", | ||
sbom: withDistro(catalogWithOverlaps( | ||
[]string{"rpm:[email protected]", "python:[email protected]"}, | ||
[]string{"rpm:[email protected] -> python:[email protected]"}), "amzn"), | ||
expectedPackages: []string{"rpm:[email protected]", "python:[email protected]"}, | ||
}, | ||
} | ||
for _, test := range tests { | ||
t.Run(test.name, func(t *testing.T) { | ||
|