-
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 handling of one_manager_agent_env pytest marker in System tests #4782
Fix handling of one_manager_agent_env pytest marker in System tests #4782
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, minor changes are requested
tests/system/conftest.py
Outdated
@@ -126,7 +126,7 @@ def pytest_runtest_makereport(item, call): | |||
arguments[key] = str(value) | |||
extra.append(pytest_html.extras.json(arguments, name="Test arguments")) | |||
|
|||
if "cluster" in report.markers: | |||
if "cluster" in report.markers and "one_manager_agent_env" not in report.markers: |
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.
Why does one_manager_agent_env
include the cluster marker? It seems that removing the marker would result in a more maintainable approach for this particular case.
In addition, handling the logs from cluster environment using markers is not the best approach. We should consider to change this logic in order to make it more error resistant, including a minor inventory validation
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.
fixed in 0baa8e3
CHANGELOG.md
Outdated
@@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file. | |||
|
|||
### Changed | |||
|
|||
- Fix one_manager_agent_env pytest marker for System Tests ([#4763](https://github.com/wazuh/wazuh-qa/pull/4763)) \- (Tests) |
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.
- Fix one_manager_agent_env pytest marker for System Tests ([#4763](https://github.com/wazuh/wazuh-qa/pull/4763)) \- (Tests) | |
- Fix one_manager_agent_env pytest marker for System Tests ([#4782](https://github.com/wazuh/wazuh-qa/pull/4782)) \- (Tests) |
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.
Fixed in 0d43995
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.
Review Notes
LGTM
Description
This PR fixes the system tests so that it generates reports correctly when the test has the
cluster
andone_manager_agent_env
markers.Updated
Testing performed
# python3 -m pytest -m one_manager_agent_env -vvv --html=/home/qa/one_manager_agent.html