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

Syncronization testing after group deletingv3 #4143

Merged
merged 19 commits into from
Sep 8, 2023

Conversation

pro-akim
Copy link
Member

@pro-akim pro-akim commented May 2, 2023

Related issue
#3953

Description

Wazuh manager handles agent groups.
If a group is deleted from a master cluster, there will be an instance where the agents require resynchronization (syncreq).
If the group is deleted from a worker cluster, the cluster master will take care of reestablishing the group structure without the need for resynchronization.
This test suite tests the correct functioning of the mentioned use case.

Updated

-test_group_sync delete_folder_master_agent_all
-test_group_sync delete_folder_worker1_agent_all
-test_group_sync delete_folder_worker2_agent_all
-test_group_sync delete_folder_master_agent_agent1
-test_group_sync delete_folder_worker1_agent1
-test_group_sync delete_folder_worker2_agent1
-test_group_sync delete_folder_master_agent_agent2
-test_group_sync delete_folder_worker1__agent2
-test_group_sync delete_folder_worker2_agent2

Each test has 3 scenarios where groups are created and agents are assigned to groups from wazuh-master, wazuh-worker1 and wazuh-worker2


Testing performed

Tester Test path Jenkins Local OS Commit Notes
@pro-akim (Developer) /wazuh-qa/tests/system/test_cluster/test_agent_groups ⚫⚫⚫ 🟢🟢🟢 6c2985d Nothing to highlight
@user (Reviewer) ⚫⚫⚫ ⚫⚫⚫ Nothing to highlight

@pro-akim pro-akim requested a review from juliamagan May 2, 2023 13:11
@pro-akim pro-akim self-assigned this May 2, 2023
@pro-akim pro-akim linked an issue May 2, 2023 that may be closed by this pull request
@pro-akim pro-akim changed the title Syncronization testing after group deleting Syncronization testing after group deletingv3 May 2, 2023
@pro-akim pro-akim force-pushed the 3953-group_sync_statusv3 branch from a6f1215 to d7ec119 Compare May 4, 2023 17:15
@pro-akim pro-akim marked this pull request as draft May 5, 2023 08:09
@pro-akim pro-akim marked this pull request as ready for review May 5, 2023 08:10
@juliamagan juliamagan marked this pull request as draft May 10, 2023 08:37
@juliamagan juliamagan marked this pull request as ready for review May 10, 2023 08:38
@pro-akim pro-akim marked this pull request as draft May 10, 2023 14:10
@pro-akim pro-akim marked this pull request as ready for review May 10, 2023 14:10
@pro-akim pro-akim marked this pull request as draft May 11, 2023 10:12
@pro-akim pro-akim marked this pull request as ready for review May 11, 2023 10:12
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.

Review the clonflicts

@pytest.fixture()
def wait_end_initial_syncreq():
result = execute_wdb_query(query, test_infra_hosts[0], host_manager)
while 'syncreq' in result:
Copy link
Member

Choose a reason for hiding this comment

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

We need to add a timeout

Copy link
Member Author

Choose a reason for hiding this comment

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

Timeout created in 6c2985d

@pro-akim pro-akim requested a review from juliamagan June 2, 2023 14:53
@pro-akim pro-akim marked this pull request as draft June 2, 2023 14:57
@pro-akim pro-akim marked this pull request as ready for review June 2, 2023 14:57
@pro-akim pro-akim marked this pull request as draft June 2, 2023 15:00
@pro-akim pro-akim marked this pull request as ready for review June 29, 2023 11:40
@pro-akim pro-akim marked this pull request as draft July 3, 2023 07:49
@pro-akim pro-akim marked this pull request as ready for review July 3, 2023 07:49
@pro-akim pro-akim marked this pull request as draft July 3, 2023 08:02
@pro-akim pro-akim marked this pull request as ready for review July 3, 2023 08:02
@pro-akim pro-akim marked this pull request as draft July 3, 2023 08:07
@pro-akim pro-akim marked this pull request as ready for review July 3, 2023 08:07
@pro-akim pro-akim marked this pull request as draft July 3, 2023 08:09
@pro-akim pro-akim marked this pull request as ready for review July 3, 2023 08:09
@pro-akim pro-akim marked this pull request as draft July 3, 2023 08:11
@pro-akim pro-akim marked this pull request as ready for review July 3, 2023 08:11
@pro-akim pro-akim changed the base branch from 4.4 to master September 6, 2023 10:40
@davidjiglesias davidjiglesias merged commit f4a5d79 into master Sep 8, 2023
@davidjiglesias davidjiglesias deleted the 3953-group_sync_statusv3 branch September 8, 2023 08:25
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 coverage to group_sync_status updated correctly on each node
3 participants