Report generated on 03-May-2024 at 14:22:04 by pytest-html v3.1.1
Packages | {"pluggy": "0.13.1", "pytest": "7.1.2"} |
Platform | Linux-6.6.10-76060610-generic-x86_64-with-glibc2.35 |
Plugins | {"html": "3.1.1", "metadata": "2.0.4", "testinfra": "5.0.0"} |
Python | 3.9.7 |
5 tests ran in 6417.35 seconds.
(Un)check the boxes to filter the results.
4 passed, 0 skipped, 1 failed, 0 errors, 0 expected failures, 0 unexpected passesTests | Failed | Success | XFail | Error |
---|---|---|---|---|
test_cluster/test_agent_groups/test_groups_sync_default.py | 0 | 2 | 0 | 0 |
test_cluster/test_agent_groups/test_groups_sync_time.py | 0 | 2 | 0 | 0 |
test_shutdown_message/test_shutdown_message.py | 1 | 0 | 0 | 0 |
Result | Time | Test | Description | Duration | Markers | Links | Tier |
---|---|---|---|---|---|---|---|
No results found. Try to check the filters | |||||||
Failed | 2024-05-03 12:22:04.940464 | test_shutdown_message/test_shutdown_message.py::test_shut_down_message_gracefully_stopped_agent | description: Checking shutdown message when socket is closed.. wazuh_min_version: 4.6.0. parameters:. - configure_environment:. type: function. brief: Register and restart all the agents to manipulate them after.. - stop_gracefully_all_agents:. type: function. brief: Stop agents gracefully. assertions:. - Verify that all agents status became 'Disconnected' after gracefully shutdown. | 344.80 | cluster, big_cluster_40_agents_env | Test arguments wazuh-worker1_cluster.log wazuh-master_cluster.log wazuh-worker2_cluster.log wazuh-master_ossec.log | |
Test function detailsExtended Summaryinput_description: Different use cases are found in the test module and include parameters. expected_output: - Gracefully closed, it is expected to find agents 'Disconected' in agent-manager Parametersconfigure_environment = None, stop_gracefully_all_agents = None def test_shut_down_message_gracefully_stopped_agent(configure_environment, stop_gracefully_all_agents): ''' description: Checking shutdown message when socket is closed. wazuh_min_version: 4.6.0 parameters: - configure_environment: type: function brief: Register and restart all the agents to manipulate them after. - stop_gracefully_all_agents: type: function brief: Stop agents gracefully assertions: - Verify that all agents status became 'Disconnected' after gracefully shutdown. input_description: Different use cases are found in the test module and include parameters. expected_output: - Gracefully closed, it is expected to find agents 'Disconected' in agent-manager ''' time.sleep(T_10) shutdown_messages = 0 HostMonitor(inventory_path=inventory_path, messages_path=messages_path, tmp_path=tmp_path).run() ossec_log = host_manager.get_file_content(test_infra_managers[0], LOG_FILE_PATH) for line in ossec_log.split('\n'): if 'HC_SHUTDOWN' in line: shutdown_messages += 1 matches = re.findall(r"Disconnected", host_manager.run_command(test_infra_managers[0], f'{WAZUH_PATH}/bin/agent_control -l')) > assert len(matches) == number_agents == shutdown_messages E AssertionError: assert 39 == 40 E + where 39 = len(['Disconnected', 'Disconnected', 'Disconnected', 'Disconnected', 'Disconnected', 'Disconnected', ...]) tests/system/test_shutdown_message/test_shutdown_message.py:114: AssertionError ------------------------------Captured stderr call------------------------------ 2024-05-03 14:21:10,763 - wazuh_testing - DEBUG - Add new file composer process for wazuh-master and path: /var/ossec/logs/ossec.log 2024-05-03 14:21:10,764 - wazuh_testing - DEBUG - Starting file composer for wazuh-master and path: /var/ossec/logs/ossec.log. Composite file in /home/juliamagan/Desktop/QA/5199/wazuh-qa/tests/system/test_shutdown_message/tmp/wazuh-master_ossec.log.tmp 2024-05-03 14:21:10,764 - wazuh_testing - DEBUG - Add new file monitor process for wazuh-master and path: /var/ossec/logs/ossec.log 2024-05-03 14:21:10,766 - wazuh_testing - DEBUG - Starting QueueMonitor for wazuh-master and message: .*HC_SHUTDOWN.* 2024-05-03 14:21:12,280 - wazuh_testing - DEBUG - Finishing QueueMonitor for wazuh-master and message: .*HC_SHUTDOWN.* 2024-05-03 14:21:13,276 - wazuh_testing - DEBUG - Cleaning temporal files... 2024-05-03 14:21:13,276 - wazuh_testing - DEBUG - Checking results... 2024-05-03 14:21:13,277 - wazuh_testing - DEBUG - Received from wazuh-master the expected message: True -------------------------------Captured log call-------------------------------- DEBUG wazuh_testing:system_monitoring.py:78 Add new file composer process for wazuh-master and path: /var/ossec/logs/ossec.log DEBUG wazuh_testing:system_monitoring.py:82 Add new file monitor process for wazuh-master and path: /var/ossec/logs/ossec.log DEBUG wazuh_testing:system_monitoring.py:185 Cleaning temporal files... DEBUG wazuh_testing:system_monitoring.py:174 Checking results... DEBUG wazuh_testing:system_monitoring.py:180 Received from wazuh-master the expected message: True | |||||||
Passed | 2024-05-03 12:22:04.912012 | test_cluster/test_agent_groups/test_groups_sync_default.py::test_agent_groups_sync_default[wazuh-master] | description: Check that after a long time when the manager has been unable to synchronize de databases, because. new agents are being continually added, database synchronization is forced and the expected information is in. all nodes after the expected sync time. For this, an agent is restarted and connects to the agent every roughly 10. seconds, during 400 seconds. After all agents have been registered, it is checked that the wazuhDB has been synched. in all the cluster nodes.. wazuh_min_version: 4.4.0. parameters:. - target_host:. type: List. brief: Name of the host where the agent will register in each case.. - clean_enviroment:. type: Fixture. brief: Reset the wazuh log files at the start of the test. Remove all registered agents from master.. assertions:. - Verify that after registering and after starting the agent, the agent has the default group is assigned.. - Assert that all Agents have been restarted. expected_output:. - The 'Agent_name' with ID 'Agent_id' belongs to groups: 'group_name'. | 1442.74 | cluster, big_cluster_40_agents_env | ||
No log output captured. | |||||||
Passed | 2024-05-03 12:22:04.912299 | test_cluster/test_agent_groups/test_groups_sync_default.py::test_agent_groups_sync_default[wazuh-worker1] | description: Check that after a long time when the manager has been unable to synchronize de databases, because. new agents are being continually added, database synchronization is forced and the expected information is in. all nodes after the expected sync time. For this, an agent is restarted and connects to the agent every roughly 10. seconds, during 400 seconds. After all agents have been registered, it is checked that the wazuhDB has been synched. in all the cluster nodes.. wazuh_min_version: 4.4.0. parameters:. - target_host:. type: List. brief: Name of the host where the agent will register in each case.. - clean_enviroment:. type: Fixture. brief: Reset the wazuh log files at the start of the test. Remove all registered agents from master.. assertions:. - Verify that after registering and after starting the agent, the agent has the default group is assigned.. - Assert that all Agents have been restarted. expected_output:. - The 'Agent_name' with ID 'Agent_id' belongs to groups: 'group_name'. | 1502.78 | cluster, big_cluster_40_agents_env | ||
No log output captured. | |||||||
Passed | 2024-05-03 12:22:04.912474 | test_cluster/test_agent_groups/test_groups_sync_time.py::test_agent_groups_sync_time[wazuh-master] | description: Check that after a long time when the manager has been unable to synchronize de databases, because. new agents are being continually added, database synchronization is forced and the expected information is in. all nodes after the expected sync time.. wazuh_min_version: 4.4.0. parameters:. - agent_host:. type: List. brief: Name of the host where the agent will register en each case.. - clean_enviroment:. type: Fixture. brief: Reset the wazuh log files at the start of the test. Remove all registered agents from master.. assertions:. - Verify that after registering and after starting the agent, the indicated group is synchronized.. expected_output:. - The 'Agent_name' with ID 'Agent_id' belongs to groups: 'group_name'. | 1560.29 | cluster, big_cluster_40_agents_env | ||
No log output captured. | |||||||
Passed | 2024-05-03 12:22:04.912631 | test_cluster/test_agent_groups/test_groups_sync_time.py::test_agent_groups_sync_time[wazuh-worker1] | description: Check that after a long time when the manager has been unable to synchronize de databases, because. new agents are being continually added, database synchronization is forced and the expected information is in. all nodes after the expected sync time.. wazuh_min_version: 4.4.0. parameters:. - agent_host:. type: List. brief: Name of the host where the agent will register en each case.. - clean_enviroment:. type: Fixture. brief: Reset the wazuh log files at the start of the test. Remove all registered agents from master.. assertions:. - Verify that after registering and after starting the agent, the indicated group is synchronized.. expected_output:. - The 'Agent_name' with ID 'Agent_id' belongs to groups: 'group_name'. | 1549.83 | cluster, big_cluster_40_agents_env | ||
No log output captured. |