Functional tests are drifting causing unnecessary failures
alfredodeza opened this issue · comments
Alfredo Deza commented
The following test is failing:
_________________ TestNonOsVulnerabilities.test_package_paths __________________
self = <image.test_vuln.TestNonOsVulnerabilities object at 0x7f29a3068100>
stdout = ['Vulnerability ID Package Severity Fix CVE Refs Vulnerabi...-c6jq-h4jp-72pr python github:python /usr/local/lib64/python3.6/site-packages/aubio ', '']
def test_package_paths(self, stdout):
output = "".join(stdout)
assert "/usr/local/lib64/python3.6/site-packages/aubio " in output
> assert "/usr/local/lib/python3.6/site-packages/python-dbusmock " in output
E AssertionError: assert '/usr/local/lib/python3.6/site-packages/python-dbusmock
After inspecting the image in question, the path that the test references is no longer there (note python-dbusmock
doesn't exist):
$ ls /usr/local/lib/python3.6/site-packages/
dbusmock python_dbusmock-0.15-py3.6.egg-info
So the image has changed somehow. And syft
is now pointing to an egg-info as the package:
"name": "python-dbusmock",
"version": "0.15",
"type": "python",
"foundBy": "python-package-cataloger",
"locations": [
{
"path": "/usr/local/lib/python3.6/site-packages/python_dbusmock-0.15-py3.6.egg-info/PKG-INFO",
"layerID": "sha256:78884c453f4c08362897a9708a30e9b8d3ff99091f939ec4081f0e4615cb511c"
},
{
"path": "/usr/local/lib/python3.6/site-packages/python_dbusmock-0.15-py3.6.egg-info/top_level.txt",
"layerID": "sha256:78884c453f4c08362897a9708a30e9b8d3ff99091f939ec4081f0e4615cb511c"
}
],
"licenses": [
"LGPL 3+"
],
For now, the test should omit the egg-info line and skip. But this ticket should address the underlying fact of using a personal repository and image (alfredodeza/vulnerable
).
A separate issue on syft
should be followed up as well.
There are two problems here, first that the test is dated
Swathi Gangisetty commented
Closing this ticket since #150 was merged