-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests using real files #107
Comments
(Adding the gsoc tag since this is a good easy PR for prospective GSoC students) |
Note that when you test this, you'll need to enable LONG_TESTS as follows: LONG_TESTS=1 python -m unittest test.test_scanner.TestScanner.test_rpm_curl_7_32_0 |
All of the checkers currently have at least one file test as of #125. We have confirmed that some signatures work on some packages but not others, so if you're looking to add new tests of this type, I recommend trying to make sure you get ones in different formats or from different distributions. For example, if there's already a .rpm from fedora, try adding a .deb from debian or a .tar.gz from the developer. |
This needs to be updated with the new test setup |
To make the basic test suite run quickly, we use "faked" binary files to test the CVE mappings. However, we want to be able to test real files to test that the signatures work on real-world data.
In #99, I've added a _file_test function (to match the existing _binary_test) that takes a url, and package name and a version, and downloads the file, runs the scanner against it, and makes sure it is the file that you've specified. But we need more tests!
test/
I'd like to have at least one test for every checker, and it would be nice to have some different sources for each as well. For example, for packages available in common Linux distributions, we might want to have one from fedora, one from debian, and one direct from upstream to show that we detect all those versions.
The text was updated successfully, but these errors were encountered: