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 a test to check that the queue socket remains after a configuration test #1850

Closed
vikman90 opened this issue Sep 7, 2021 · 4 comments · Fixed by #2405
Closed

Add a test to check that the queue socket remains after a configuration test #1850

vikman90 opened this issue Sep 7, 2021 · 4 comments · Fixed by #2405

Comments

@vikman90
Copy link
Member

vikman90 commented Sep 7, 2021

Installation Component Version Related issue
Manager Analysisd 4.2.2+ wazuh/wazuh#9985

As reported in the issue above, we need to check that the Analysisd's input socket (queue/sockets/queue) file remains after running Analysisd in test mode:

bin/wazuh-analysisd -t

We can implement this test by checking that the following properties of the file won't change after running Analysisd in test mode:

  • Inode
  • Modification time

Known versions where this test would fail

  • 4.2.0
  • 4.2.1
@fernandolojano
Copy link
Contributor

The working branch for this issue is: 1850-check-queue-socket-status-test

@fernandolojano
Copy link
Contributor

As for now, there is a first approach for the requested test already implemented. The implementation checks if the Inode value and the File Time value of the queue socket change when the command bin/wazuh-analysisd -t gets executed. It seems like the Inode value does not get affected by the analysis update, however, the File time value does get modified, making the test fail.
The issue is not solved yet as the implementation still needs some feedback from the team and, after getting the approval for the implementation, it remains to document the test with the qa-docs format.

@mauromalara
Copy link
Contributor

mauromalara commented Jan 17, 2022

  • Style guide (pycodestyle --max-line-length=120) (FAILED) 🔴

QA-docs execution

test_queue_socket_properties

qa-docs --tests-path tests/integration/test_analysisd/test_queue_socket_properties/ -t test_queue_socket_properties

Results

2022-01-17 12:57:20,028 - INFO - Looking for test_queue_socket_properties.py
2022-01-17 12:57:20,028 - INFO - Parsing the following test(s) ['test_queue_socket_properties']
2022-01-17 12:57:20,037 - INFO - Running QADOCS
2022-01-17 12:57:20,037 - INFO - Starting test documentation parsing
2022-01-17 12:57:20,037 - INFO - Looking for test_queue_socket_properties.py
test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py: 1

2022-01-17 12:57:20,129 - INFO - Run completed, documentation location: /home/mauro/Documents/Wazuh/wazuh-qa/deps/wazuh_testing/venv/lib/python3.8/site-packages/wazuh_testing-4.3.0-py3.8.egg/wazuh_testing/qa_docs/output

Output File

test_queue_socket_properties.zip

@mauromalara
Copy link
Contributor

Style guide

pycodestyle --max-line-length=120 tests/integration/test_analysisd/test_queue_socket_properties/test_queue_socket_properties.py (PASSED) 🟢

QA-docs execution

test_queue_socket_properties

qa-docs --tests-path /home/mauro/Documents/Wazuh/issue/1850/wazuh-qa/tests/integration/test_analysisd/test_queue_socket_properties/ -t test_queue_socket_properties

Results

2022-01-18 15:38:22,322 - INFO - Looking for test_queue_socket_properties.py
2022-01-18 15:38:22,322 - INFO - Parsing the following test(s) ['test_queue_socket_properties']
2022-01-18 15:38:22,336 - INFO - Running QADOCS
2022-01-18 15:38:22,336 - INFO - Looking for test_queue_socket_properties.py
2022-01-18 15:38:22,488 - INFO - Run completed, documentation location: /tmp/qa_docs/output

Output File

test_queue_socket_properties.zip

Rebits pushed a commit that referenced this issue Mar 17, 2022
mauromalara pushed a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara pushed a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
mauromalara added a commit that referenced this issue Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants