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

Check 'client.keys' existence after deletion in agentd integration test #5429

Conversation

nbertoldo
Copy link
Member

@nbertoldo nbertoldo commented May 23, 2024

Related issue
wazuh/wazuh#23465

Description

It has been seen in wazuh/wazuh#23465 that randomly fails the test_agentd_reconection_enrollment_no_keys_file.
Although it could not be replicated, it is observed in the logs that apparently 'client.keys' file is not being deleted. This causes the agent to connect directly to the manager (with the valid key) skipping the enrollment process and so the test fails.
This PR adds an extra check after deleting 'client.keys' file and in case the file exists an exception is raised.

Updated

  • tests/integration/test_agentd/test_agentd_reconnection.py

Testing performed

Tester Test path Jenkins Local OS Commit Notes
@nbertoldo (Developer) tests\integration\test_agentd ⚫⚫ 🟢🟢 Windows Server 2016 1cbc994 Nothing to highlight
@cborla (Reviewer) tests\integration\test_agentd 🟢🟢 ⚫⚫ Centos 8 1cbc994 Nothing to highlight
@cborla (Reviewer) tests\integration\test_agentd 🟢🟢 ⚫⚫ Windows Server 2016 1cbc994 Nothing to highlight

@nbertoldo nbertoldo self-assigned this May 23, 2024
@nbertoldo nbertoldo force-pushed the fix/23465-windows-agentd-integration-tests-fails-for-480-rc2 branch from 7991cb1 to 7cf1f62 Compare May 23, 2024 19:32
@nbertoldo nbertoldo linked an issue May 23, 2024 that may be closed by this pull request
@nbertoldo nbertoldo force-pushed the fix/23465-windows-agentd-integration-tests-fails-for-480-rc2 branch from 7cf1f62 to 1cbc994 Compare May 23, 2024 21:13
@nbertoldo nbertoldo requested review from vikman90 and cborla May 23, 2024 21:16
@nbertoldo nbertoldo marked this pull request as draft May 23, 2024 21:16
Copy link
Member

@cborla cborla left a comment

Choose a reason for hiding this comment

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

LGTM

@cborla cborla marked this pull request as ready for review May 24, 2024 00:18
@vikman90
Copy link
Member

vikman90 commented Jun 3, 2024

Closing this PR as wazuh/wazuh#23465 is closed.

@vikman90 vikman90 closed this Jun 3, 2024
@vikman90 vikman90 deleted the fix/23465-windows-agentd-integration-tests-fails-for-480-rc2 branch June 3, 2024 13:20
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.

Windows Agentd Integration tests fails for 4.8.0 RC2
3 participants