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

wazuh-agentd stats IT #1039

Merged
merged 5 commits into from
Feb 24, 2021
Merged

wazuh-agentd stats IT #1039

merged 5 commits into from
Feb 24, 2021

Conversation

jnasselle
Copy link
Member

@jnasselle jnasselle commented Feb 4, 2021

Related issue
Closes #1034

Description

Hi team!
This PR aims to add integration test for wazuh-agentd stats mechanism, that consist in:

  • Test different agent.state_interval values
  • Test remote request (getstate) and their correct value

Tests

  • Proven that tests pass when they have to pass.
  • Proven that tests fail when they have to fail.
  • Python codebase satisfies PEP-8 style style guide. pycodestyle --max-line-length=120 --show-source --show-pep8 file.py

Regards,
Nico

@jnasselle jnasselle self-assigned this Feb 4, 2021
@jnasselle jnasselle marked this pull request as ready for review February 9, 2021 01:51
@jnasselle jnasselle changed the title wazuh-agentd stats configuration tests wazuh-agentd stats IT Feb 9, 2021
JcabreraC
JcabreraC previously approved these changes Feb 9, 2021
deps/wazuh_testing/wazuh_testing/agent.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/agent.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/agent.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/agent.py Outdated Show resolved Hide resolved
deps/wazuh_testing/wazuh_testing/agent.py Outdated Show resolved Hide resolved
tests/integration/test_agentd/test_agentd_state_config.py Outdated Show resolved Hide resolved
tests/integration/test_agentd/test_agentd_state_config.py Outdated Show resolved Hide resolved
tests/integration/test_agentd/test_agentd_state_config.py Outdated Show resolved Hide resolved
tests/integration/test_agentd/test_agentd_state_config.py Outdated Show resolved Hide resolved
tests/integration/test_agentd/test_agentd_state_config.py Outdated Show resolved Hide resolved
nmkoremblum
nmkoremblum previously approved these changes Feb 10, 2021
juliancnn
juliancnn previously approved these changes Feb 10, 2021
Copy link
Contributor

@jmv74211 jmv74211 left a comment

Choose a reason for hiding this comment

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

I see you have used a different function documentation format, although I think this is also interpretable by Sphinx. Please check this.

I have also seen several global declarations in the files that I think are unnecessary. I've indicated one, but I've seen several, so please take an overview of all of them and consider whether they are really necessary.

tests/integration/test_agentd/test_agentd_state.py Outdated Show resolved Hide resolved
JcabreraC
JcabreraC previously approved these changes Feb 10, 2021
juliancnn
juliancnn previously approved these changes Feb 10, 2021
nmkoremblum
nmkoremblum previously approved these changes Feb 10, 2021
JcabreraC
JcabreraC previously approved these changes Feb 10, 2021
BraulioV
BraulioV previously approved these changes Feb 11, 2021
jmv74211
jmv74211 previously approved these changes Feb 11, 2021
- Fix some race condition in configuration tests
- Add remote/file state tests
- Add request method to RemotedSimulator
- Remove default read permission for file opening
- Change doubles quotes to single quotes for strings
- Add docstrings
- Rename some functions and variables to be more intuitive
- Change state file name in windows agent
- Reorder some tests asserts
- Reorder imports
- Change line limits from 80 to 120
- Unify duplicated funcions
- Rename confusing variables and functions
- Change some docstrings
- Change way for reading and iterating thru files
- Remove unnecessary global statements
- Fix some docstrings
- Better approach to change internals values
- Increase timeout in watching logs functions
Copy link
Contributor

@nmkoremblum nmkoremblum left a comment

Choose a reason for hiding this comment

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

LGTM :)

Copy link
Member

@JcabreraC JcabreraC left a comment

Choose a reason for hiding this comment

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

LGTM !!

@vikman90 vikman90 merged commit 541da0f into master Feb 24, 2021
@vikman90 vikman90 deleted the 1034-agentd-stats-enhancement branch February 24, 2021 14:34
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.

Integration test for wazuh-agentd statistics
7 participants