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

Windows Logcollector agent IT fails due to errors during directory creation/removal #5096

Closed
Rebits opened this issue Mar 13, 2024 · 2 comments
Labels

Comments

@Rebits
Copy link
Member

Rebits commented Mar 13, 2024

Target version Related issue
4.8.0-beta4 wazuh/wazuh#22479

Description

Logcollector IT fails in Windows agent due to errors in the directory and file creation and deletion fixture.
No errors were collected from the environment due to tests fail in fixture instead of the test itself.

E           OSError: [WinError 145] The directory is not empty: 'c:\\testfolder\\subfolder'
...
E       PermissionError: [Errno 13] Permission denied: 'c:\\test'

Evidences

@MarcelKemp
Copy link
Member

MarcelKemp commented Mar 13, 2024

For the first case, the error was investigated in the following issue:

However, the problem seems to come from the fixture and that would be fixed in the next issue:

The error The directory is not empty: 'c:\\testfolder\\subfolder' was thoroughly investigated, but the situation in which it occurs was not found (we have not been able to reproduce it).
It occurs during the create_files_in_folder fixture, which is responsible for generating the directories and files needed for the test, and at the end of the test:

yield
delete_path_recursively(folder_path)

That ends up calling shutil.rmtree, which normally should be able to delete all the contents of the directory. It is necessary to investigate in which cases can appear a problem when deleting a file, but testing logcollector module in similar situation, Wazuh code not have any problem deleting this files.

@MarcelKemp MarcelKemp changed the title Windows FIM agent IT fails due to errors during directory creation/removal Windows Logcollector agent IT fails due to errors during directory creation/removal Mar 13, 2024
@TomasTurina
Copy link
Member

This error was already fixed in the IT migration task. Closing as not planned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

3 participants