-
Notifications
You must be signed in to change notification settings - Fork 32
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
Tests fail during feed downloads and others finished with setup errors in the VD suite #4370
Tests fail during feed downloads and others finished with setup errors in the VD suite #4370
Comments
Evidence of the testHTML-report.zip Analysis of errors in the test's setupThere are also some tests with errors:
The test has a fixture to download the feed before the test starts and then it decompress the data from the feed. But, when the provider has changed the URL or the file is not available, the test will fail as it tries to decompress HTML data, for instance: data = b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>N...server.</p>\n<hr>\n<address>Apache/2.4.29 (Ubuntu) Server at people.canonical.com Port 443</address>\n</body></html>\n'
def decompress(data):
"""Decompress a block of data.
For incremental decompression, use a BZ2Decompressor object instead.
"""
results = []
while data:
decomp = BZ2Decompressor()
try:
> res = decomp.decompress(data)
E OSError: Invalid data stream ConclusionThat test is flaky because it does not handle this kind of error at startup preventing the test from being executed. The test should control this kind of scenario and let the test continue its normal execution. |
Evidence of the testHTML-report.zip Analysis of failures in the test
So, when I tried to get the feed through $ wget https://ftp.suse.com/pub/projects/security/oval/suse.linux.enterprise.server.12.xml
--2023-07-28 16:54:35-- https://ftp.suse.com/pub/projects/security/oval/suse.linux.enterprise.server.12.xml
Resolving ftp.suse.com (ftp.suse.com)... 195.135.221.132
Connecting to ftp.suse.com (ftp.suse.com)|195.135.221.132|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 185753599 (177M) [text/xml]
Saving to: ‘suse.linux.enterprise.server.12.xml’
suse.linux.enterprise.s 0%[ ] 447.49K 70.4KB/s eta 42m 49s The ETA is above the test and manager timeouts. So, the test is failing as expected. Also, the manager is detecting this timeout and reporting it in the logs:
ConclusionThe failures are not related to the test itself or the product but to SUSE's servers. We cannot say that a test fails because a provider has a problem. Because we want to test our product. |
Based on the conclusions above from @mauromalara I will move this issue to @wazuh/core for them to fix or refactor accordingly. |
This issue errorss where present in 4.5.1 - Alpha 1 wazuh/wazuh#18286 |
This issue is related to the following development: So they should be fixed after completion. |
|
Description
During the 4.5.0 Alpha 1 Integration testing, some Vulnerability tests failed:
test_vulnerability_detector/test_feeds/test_download_feeds.py
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Desktop 15
The error reported is a
TimeoutError
when monitoring the log(.*) feed finished
log, whereas the expected values are:SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Desktop 15
This issue needs to be investigated and addressed to ensure the proper functioning of the Vulnerability tests for the mentioned distributions. It's possible that the timeout duration does not align with the download time required for the mentioned feeds.
The text was updated successfully, but these errors were encountered: