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

Add Windows System folders monitoring test support #3720

Merged
merged 29 commits into from
Jan 25, 2023

Conversation

Deblintrake09
Copy link
Contributor

@Deblintrake09 Deblintrake09 commented Jan 3, 2023

Related issue
#3652

Description

This PR aims to add IT support for FIM monitoring of windows' system folders (System32, SysWOW64) and path redirection from Sysnative to System32.

Added

  • The test_windows_system_folder_redirection test suite adds a total of 9 test cases, monitoring the different system folders in each fim_mode.

Testing performed

Tester Test path Jenkins Local OS Commit Notes
@Deblintrake09 (Developer) test_fim 🟢🟢🟢 ⚫⚫⚫ Manager 235a5b5 Nothing to highlight
@Deblintrake09 (Developer) test_fim 🟢🟢🟢 ⚫⚫⚫ Agent Centos 235a5b5 Nothing to highlight
@Deblintrake09 (Developer) test_fim 🔵🔵🔵 ⚫⚫⚫ Agent Solaris, macOS c709499 Cannot launch test on this OSs because of Jenkins Issues
@Deblintrake09 (Developer) test_fim 🟢🟢🟢 🟢🟢🟢 Windows 235a5b5 Locally launched only added tests
@damarisg (Reviewer) /test_fim 🟢 🚫 🚫 🚫 Manager 9a9efb6 Nothing to highlight
@damarisg (Reviewer) /test_fim 🟢 🚫 🚫 🚫 Agent Windows 9a9efb6 Nothing to highlight

DEVELOPER NOTE: Local executions only contain added test, because local environment is having problems with running the complete test_fim folder. Only ran on Windows since the test has a win32 mark and is automatically skipped in other OSs.

@Deblintrake09 Deblintrake09 force-pushed the 3562-windows-folder-redirection branch from 5084fd6 to f94979a Compare January 3, 2023 18:21
@Deblintrake09 Deblintrake09 linked an issue Jan 3, 2023 that may be closed by this pull request
3 tasks
# tests
@pytest.mark.parametrize('test_folders', [test_folders], ids='', scope='module')
@pytest.mark.parametrize('configuration, metadata', zip(configurations, configuration_metadata), ids=test_case_ids)
def test_windows_folder_redirection(configuration, metadata, test_folders, set_wazuh_configuration,
Copy link
Member

Choose a reason for hiding this comment

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

FIM has a lot of tests, so I have a few suggestions:

1. To organize the tests correctly, could you improve the path where is store the test? I see words that a lot are repeated.

It should be more general to help us separate by sections.

2. I would like to know is what happens in this case of synchronization.

We have a section that is to add synchronization tests and contains other cases to check it. Why did you decide not to do synchronization cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. Renamed the test name to avoid repeating words and be a bit more descriptive.
  2. This has not been tested for synchronization, because it is not related to it, no changes related to synchronization. It was needed to test that the folders are monitored and redirection from Sysnative works properly, but once it is monitored, the synchronization behavior is the same as any other folder.

Copy link
Member

Choose a reason for hiding this comment

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

  1. We will wait for another reviewer to review it. I think that it should be improved.

  2. Resolve

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Regarding 2, as talked in call, This fix does not affect synchronization at all, it is just a fix so Windows system folders can be properly monitored. Once monitored, the synchronization works as with any other folder.

damarisg
damarisg previously approved these changes Jan 11, 2023
@jmv74211 jmv74211 merged commit 22a8ba0 into master Jan 25, 2023
@jmv74211 jmv74211 deleted the 3562-windows-folder-redirection branch January 25, 2023 09:14
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 FIM monitoring windows/System32 folder
3 participants