-
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
Fix timeout and performance issues in Indexer E2E requests #5003
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ! Only a few minor changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file there are changes from #4959, so it will be locked until the previous PR is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, this change depends on the #4959. However, it does not block the development.
deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py
Outdated
Show resolved
Hide resolved
deps/wazuh_testing/wazuh_testing/end_to_end/vulnerability_detector.py
Outdated
Show resolved
Hide resolved
tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py
Show resolved
Hide resolved
@@ -139,6 +133,12 @@ def setup_vulnerability_tests(host_manager: HostManager) -> Generator: | |||
logger.error("Restarting managers") | |||
host_manager.control_environment('restart', ['manager']) | |||
|
|||
logger.error("Save the Wazuh indexer username and password into the Wazuh manager keystore") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be info
or debug
instead of error
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have not determinate the logic of the logging. I suggest the following:
- Critical: Logging messages from the tests
- Error: Logging messages from the fixtures
- Info: Logging messages from the rest of the libraries
- Debug: Very verbose logging messages like testinfra/ansible debug messages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will revisit this in the future
logging_message = 'Syscollector scan not started in the following agents:' \ | ||
f"{test_result['evidences']['agents_not_scanned_first_scan']}." | ||
logger.critical(logging_message) | ||
pytest.fail(logging_message) | ||
else: | ||
logger.critical("All agents has been scanned") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related conversation #5003 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will revisit this in the future
tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py
Show resolved
Hide resolved
tests/end_to_end/test_vulnerability_detector/test_vulnerability_detector.py
Show resolved
Hide resolved
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
This PR include several fixes for the E2E Vulnerability Detection tests:
Testing performed
E2E Initial scans: InitialScans.zip
Warning
No assets were included due to they surpass the maximun size. We should consider allow customization of the report assets to reduce the size
Report failures are due to:
test_syscollector_first_scan_alerts
: No vulns are detected for windows hosts. Reported here Vulnerability Detection encounters issues while processing PyPI packages wazuh#21811test_syscollector_first_scan_index
: It seems that indexer connection was lost in the middle of the test. Further research is required. It has been checked manually that wazuh-indexer is running and the keystore was correctly updated. After restarting indexer seems to work as expected.tests_syscollector_vulnerabilities_index_alerts_consistency
: Same as test_syscollector_first_scan_index