mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 22:12:28 +01:00
Fix acceptance tests (#158)
* ensure acceptance tests fail when results are piped Signed-off-by: Alex Goodman <alex.goodman@anchore.com> * fix spelling in inline-compare python script Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
@@ -151,7 +151,7 @@ def main(image):
|
||||
) * 100.0
|
||||
|
||||
bonus_packages = syft_packages - inline_packages
|
||||
missing_pacakges = inline_packages - syft_packages
|
||||
missing_packages = inline_packages - syft_packages
|
||||
|
||||
inline_metadata_set = set()
|
||||
for package in inline_packages:
|
||||
@@ -171,7 +171,7 @@ def main(image):
|
||||
) * 100.0
|
||||
missing_metadata = inline_metadata_set - same_metadata
|
||||
|
||||
if len(bonus_packages) > 0:
|
||||
if bonus_packages:
|
||||
rows = []
|
||||
print(colors.bold + "Syft found extra packages:", colors.reset)
|
||||
for package in sorted(list(bonus_packages)):
|
||||
@@ -179,15 +179,15 @@ def main(image):
|
||||
print_rows(rows)
|
||||
print()
|
||||
|
||||
if len(missing_pacakges) > 0:
|
||||
if missing_packages:
|
||||
rows = []
|
||||
print(colors.bold + "Syft missed packages:", colors.reset)
|
||||
for package in sorted(list(missing_pacakges)):
|
||||
for package in sorted(list(missing_packages)):
|
||||
rows.append([INDENT, repr(package)])
|
||||
print_rows(rows)
|
||||
print()
|
||||
|
||||
if len(missing_metadata) > 0:
|
||||
if missing_metadata:
|
||||
rows = []
|
||||
print(colors.bold + "Syft mismatched metadata:", colors.reset)
|
||||
for inline_metadata_pair in sorted(list(missing_metadata)):
|
||||
|
||||
Reference in New Issue
Block a user