-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1466 from wazuh/1465-macos-filestatus-IT-T0
IT for macos file_status
- Loading branch information
Showing
18 changed files
with
629 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Python cache | ||
__pycache__ | ||
.pytest_cache/ | ||
.pytest_cache | ||
|
||
venv | ||
wazuh_testing.egg-info | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
.../tests/integration/test_logcollector/test_macos/test_macos_file_status_basic.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Test macOS - File status basic | ||
|
||
## Overview | ||
|
||
Checks if `wazuh-logcollector` correctly generates the `file_status.json` file used by `only future events`. | ||
|
||
## Objective | ||
|
||
- To confirm that the Wazuh macOS agent generates a valid status file (`file_status.json`) | ||
that can be used at the next startup of Wazuh-Logcollector | ||
|
||
## General info | ||
|
||
|Tier | Total | Time spent | | ||
| :--:| :--: | :--: | | ||
| 0 | 2 | 105s | | ||
|
||
## Expected behavior | ||
|
||
- Fail if `wazuh-logcollector` does not gather generated unified logging system event or does not send it to the manager | ||
- Fail if `wazuh-logcollector` does not create the status file `status_file.json` | ||
- Fail if `wazuh-logcollector` saves incorrectly formatted, or invalid data in the status file `status_file.json`. | ||
|
||
## Code documentation | ||
|
||
::: tests.integration.test_logcollector.test_macos.test_macos_file_status_basic |
27 changes: 27 additions & 0 deletions
27
...ts/integration/test_logcollector/test_macos/test_macos_file_status_predicate.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Test macOS - File status predicate | ||
|
||
## Overview | ||
|
||
Checks that `wazuh-logcollector` does not store "macos"-formatted localfile data in `file_status.json`, | ||
since its predicate is erroneous. Respective errors should be logged in the `ossec.log` file. | ||
|
||
## Objective | ||
|
||
- Confirm that, even when the Wazuh macOS agent generates a valid status file (`file_status.json`), there is no stored | ||
data related to the "macos"-formatted localfile, even when a configuration block (with an erroneous predicate) is set. | ||
|
||
## General info | ||
|
||
|Tier | Total | Time spent | | ||
| :--:| :--: | :--: | | ||
| 0 | 2 | 30s | | ||
|
||
## Expected behavior | ||
|
||
- Fail if `wazuh-logcollector` does not create the status file `status_file.json` | ||
- Fail if `wazuh-logcollector` stores "macos"-formatted localfile data in the status file `status_file.json`. | ||
- Fail if `wazuh-logcollector` does not log the errors related to `log stream` in the log file `ossec.log`. | ||
|
||
## Code documentation | ||
|
||
::: tests.integration.test_logcollector.test_macos.test_macos_file_status_predicate |
29 changes: 29 additions & 0 deletions
29
...ntegration/test_logcollector/test_macos/test_macos_file_status_when_no_macos.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Test macOS - File status when no macos | ||
## Overview | ||
|
||
Checks that `wazuh-logcollector` does not store and removes, if exists, previous | ||
"macos"-formatted localfile data in the file_status.json | ||
|
||
## Objective | ||
|
||
- Confirm that, given a file_status.json that contains a valid combination of | ||
"settings" and "timestamp" of "macos", when starting an agent that has no | ||
"macos" localfile configured on its ossec.conf file, it should happen that, when | ||
file_status.json is updated after a certain time, no "macos" status should | ||
remain stored on the status file. | ||
|
||
## General info | ||
|
||
|Tier | Total | Time spent | | ||
| :--:| :--: | :--: | | ||
| 0 | 1 | 50s | | ||
|
||
|
||
## Expected behavior | ||
|
||
- Fail if `wazuh-logcollector` stores "macos"-formatted localfile data in the status file `status_file.json`. | ||
|
||
|
||
## Code documentation | ||
|
||
::: tests.integration.test_logcollector.test_macos.test_macos_file_status_when_no_macos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.