Skip to content

Attempt to fix the tests

Brian May requested to merge bam/security-tracker:fix_tests into master

These are not really good tests. Some of them are bandwidth intensive. Failures can indicate problems with the data, as opposed to problems with the code.

$ (cd lib/python; PYTHONPATH=. python2 /home/brian/debian/lts/security-tracker/lib/python/sectracker_test/test_analyzers.py)
../../data/config.json
Traceback (most recent call last):
  File "/home/brian/debian/lts/security-tracker/lib/python/sectracker_test/test_analyzers.py", line 41, in <module>
    c.update()
  File "/home/brian/debian/lts/security-tracker/lib/python/sectracker/repo.py", line 286, in update
    self._filemap_cache = None
  File "/home/brian/debian/lts/security-tracker/lib/python/sectracker/repo.py", line 156, in update
    rel = self.release(name)
  File "/home/brian/debian/lts/security-tracker/lib/python/sectracker/repo.py", line 200, in release
    return _parserelease(name, f)
  File "/home/brian/debian/lts/security-tracker/lib/python/sectracker/repo.py", line 59, in _parserelease
    for p in _debian_support.PackageFile(path, f):
  File "/home/brian/debian/lts/security-tracker/lib/python/debian_support.py", line 155, in __iter__
    self.raiseSyntaxError("expected package field")
  File "/home/brian/debian/lts/security-tracker/lib/python/debian_support.py", line 177, in raiseSyntaxError
    raise ParseError(self.name, lineno, msg)
debian_support.ParseError: expected package field

$ (cd lib/python; PYTHONPATH=. python2 /home/brian/debian/lts/security-tracker/lib/python/sectracker_test/test_parsers.py)
../../data/CVE/list:21001: error: duplicate package annotation
../../data/CVE/list:21174: warning: REJECTED bug has package annotations

Regardless there do appear to be some problems that I have attempted to fix.

The first of these errors is because one of the files is actually a 404 error HTML page:

cat lib/python/sectracker_test/tmp/repo/r_etch-security
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /debian-security/dists/etch/updates/Release was not found on this server.</p>
<hr>
<address>Apache Server at security.debian.org Port 80</address>
</body></html>

Maybe we should delete references to etch?

Merge request reports

Loading