-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix 'test_feeds/test_missing_fields' tests in 4.2 #1553
Comments
test_feeds/test_missing_fields
tests in 4.2
2021-07-13After multiple tests, it appears that these errors originate in the These logs are written to the log file correctly, but the I continue to perform checks to locate the specific source of the problem. Test results after disabling the
|
This issue requires more research because when we execute it, we keep getting fails. We can see that this test is inconsistency.
|
Results for
|
2021-07-14I ran the tests again by recreating a new Vagrant box with a clean environment. Test results with the default modules enabled in the
Test results after disabling the
Error detailsHere you can see the instant when the test fails (test run using pytest -sv options):
The use case starts running at And ends at However, by analyzing the This behavior does not occur if modules that write a large number of messages to the log file, such as the |
Results for
Results for
|
Results when disabling modules:
|
2021-07-22Used Wazuh-QA branch: Case 1, 2
Case 3
Note that the same use case (first case) fails in the two first runs:
|
Same scenario as in the issue: #1548The problem is related to the issue: #1602, in which FileMonitor does not detect a message written to the log file under certain scenarios. In the test_invalid_syntax_redhat_feed.py test, even disabling all possible modules before launching the test does not prevent it from falling in the first use case. The cause of the failure is the large number of messages generated by enabling the internal option wazuh_modules.debug=2, which is required by multiple vulnerability detector tests. When this option is enabled and the manager is restarted, the log file takes up 1MB, this added to the messages generated by the test itself makes FileMonitor unable to process them, causing the error. |
Test Results after to merge.
|
Issue information
When it comes to starting with the test fix, there is some information that can help you:
I add some information obtained while researched the logs that failed.
Case 1:
check_feed_imported_successfully
method is called. The problem seems to be a Parser error when reading the file.Case 2:
check_feed_imported_successfully
is called. The problem seems to be a Parser error and it will be because there is a problem when imported a file.Case 3:
In order to finish this issue the following tasks should be fulfilled:
test_feeds/redhat/test_missing_fields_redhat_feed
for 3 times.test_feeds/msu/test_missing_fields_msu_feed
for 3 times.The text was updated successfully, but these errors were encountered: