Skip to content
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 alert.json to VD E2E test report #5147

Merged

Conversation

MARCOSD4
Copy link
Member

@MARCOSD4 MARCOSD4 commented Mar 25, 2024

Description

This PR aims to add the alert.json file to Vulnerability Detection E2E test report as well as the ossec.log and the test logs are attached. This will be useful since when the test indicates that the alert has not been found, we will be able to check if the alert has been triggered or not. For this purpose, a new function has been added to obtain the alerts from the alert.json file of the managers and the function in charge of collecting this information has been modified.

Testing performed

In order to test the changes that have been made, the following environment has been released https://ci.wazuh.info/job/Wazuh_QA_environment/1025/. To avoid running the entire test and not spending so much time, only the upgrade_package_remove_vulneraility test has been run, which is currently expected to fail due to what is reported in this issue #5104. When the test failed, a report was generated which indeed includes a file containing the alert.json, and is attached below:

image

image

report5105.zip

@MARCOSD4 MARCOSD4 self-assigned this Mar 25, 2024
@MARCOSD4 MARCOSD4 linked an issue Mar 25, 2024 that may be closed by this pull request
@MARCOSD4 MARCOSD4 marked this pull request as ready for review March 25, 2024 16:02
Copy link
Member

@juliamagan juliamagan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GJ, but remember to add the changelog entry.

@MARCOSD4
Copy link
Member Author

MARCOSD4 commented Apr 1, 2024

Changelog updated in 380a641

Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job. Some changes are required

deps/wazuh_testing/wazuh_testing/end_to_end/logs.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/end_to_end/logs.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/end_to_end/logs.py Outdated Show resolved Hide resolved
tests/end_to_end/test_vulnerability_detector/conftest.py Outdated Show resolved Hide resolved
Copy link
Member

@Rebits Rebits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@juliamagan juliamagan merged commit 349688c into enhancement/vd-e2e-tests Apr 4, 2024
0 of 2 checks passed
@juliamagan juliamagan deleted the enhancement/5105-add-alert-json branch April 4, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add alerts.json to Vulnerability Detector E2E test report
3 participants