-
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
System Test: Module (WAZUH-DB) - Agent never_connected connects - default group #2665
System Test: Module (WAZUH-DB) - Agent never_connected connects - default group #2665
Conversation
- previously worked on branch 2505_agent_groups_default
…ub.com/wazuh/wazuh-qa into tmp-2505-test-agent-groups-default
Tests Results
|
tests/system/test_cluster/test_agent_groups/test_agent_groups_default.py
Outdated
Show resolved
Hide resolved
tests/system/test_cluster/test_agent_groups/test_agent_groups_default.py
Outdated
Show resolved
Hide resolved
@pytest.mark.parametrize("test_infra_managers",[test_infra_managers]) | ||
@pytest.mark.parametrize("test_infra_agents",[test_infra_agents]) | ||
@pytest.mark.parametrize("host_manager",[host_manager]) | ||
@pytest.mark.parametrize("agent_target", test_infra_managers) |
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 is agent_target
not a list and contains test_infra_manager
?
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.
Parametrize requires a list of values, and test_infra_managers
is a list of all manager hosts, so it is passed that way, not inside a list.
@pytest.mark.parametrize("test_infra_agents",[test_infra_agents]) | ||
@pytest.mark.parametrize("host_manager",[host_manager]) | ||
@pytest.mark.parametrize("agent_target", test_infra_managers) | ||
def test_agent_default_group(agent_target, clean_environment, test_infra_managers, test_infra_agents, host_manager): |
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.
Change the module name and the path with the new module name. Ex: test_agent_added_the_default_group.
Also, when you change it, you should change the path in the documentation.
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.
Changed name to test_agent_default_group_added.
Did not add to path in documentation since it was removed as requested
tests/system/test_cluster/test_agent_groups/test_agent_groups_default.py
Outdated
Show resolved
Hide resolved
tests/system/test_cluster/test_agent_groups/test_agent_groups_default.py
Outdated
Show resolved
Hide resolved
tests/system/test_cluster/test_agent_groups/test_agent_groups_default.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Dámaris <[email protected]>
…azuh-qa into system_test_wazuh_db
Tests Results
|
In this PR the test suite for
Agent never_connected connects
is added. A total of 2 new test cases covering different modes and combinations of options.Cases:
- The agent on active status and connect to
master
node has the default group- The agent on active status and connect to
worker
node has the default groupConfiguration options
In order to run the test, first the environment located in
/test/system/provisioning/enrollment_cluster
must be enabled with:sudo ansible-playbook -i inventory.yml playbook.yml --extra-vars='{"wazuh_branch": "dev-10771-agent-groups-files-to-wazuh-db"}'
Local Internal Options: No Local Internal Options used
Tests Results
Required
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.