-
Notifications
You must be signed in to change notification settings - Fork 32
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
Authd replacement configurations QA #2171
Authd replacement configurations QA #2171
Conversation
…entation Force options tests implentation
…tion_time Fix wdb tests with disconnection_time
Successful executions of authd tests: Successful executions of wazuhdb tests: |
21c139f
to
56d473b
Compare
Added test descriptions for documentation.
# force options tests | ||
These tests aim to check the correct behavior of Authd under the different possible configurations of the force block. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file shouldn't be here
05/11/2021Package
Testingtests/integration/test_authd
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GJ, some changes should be implemented in order to improve readability or fit with the repository standards. Due to the urgency of this development, these changes should be implemented in a separate Issue/PR in which we could solve other test_authd
module errors.
Args: | ||
input (dict): Dictionary with the content of the request command. | ||
""" | ||
command = "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command = "" | |
command = '' |
|
||
if 'password' in input: | ||
password = input['password'] | ||
command = command + f'OSSEC PASS: {password} ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
command = command + f'OSSEC PASS: {password} ' | |
command = command + f"OSSEC PASS: {password} " |
return command | ||
|
||
|
||
# Functions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Functions |
response (str): The Authd response to be validated. | ||
expected (dict): Dictionary with the items to validate. | ||
""" | ||
response = response.split(sep=" ", maxsplit=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
response = response.split(sep=" ", maxsplit=1) | |
response = response.split(sep=' ', maxsplit=1) |
id = agent_key[0] | ||
name = agent_key[1] | ||
ip = agent_key[2] | ||
key = agent_key[3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id = agent_key[0] | |
name = agent_key[1] | |
ip = agent_key[2] | |
key = agent_key[3] | |
id, name, ip, key = agent_key[0:4] |
''' | ||
import os | ||
import time | ||
import pytest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import pytest | |
import pytest | |
tests = [] | ||
test_case_ids = [] | ||
for file in os.listdir(tests_path): | ||
group_name = file.split(".")[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group_name = file.split(".")[0] | |
group_name = file.split('.')[0] |
# Variables | ||
log_monitor_paths = [] | ||
|
||
receiver_sockets_params = [(("localhost", 1515), 'AF_INET', 'SSL_TLSv1_2')] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
receiver_sockets_params = [(("localhost", 1515), 'AF_INET', 'SSL_TLSv1_2')] | |
receiver_sockets_params = [(('localhost', 1515), 'AF_INET', 'SSL_TLSv1_2')] |
tests = [] | ||
test_case_ids = [] | ||
for file in os.listdir(tests_path): | ||
group_name = file.split(".")[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
group_name = file.split(".")[0] | |
group_name = file.split('.')[0] |
|
||
truncate_file(LOG_FILE_PATH) | ||
try: | ||
control_service("restart", daemon=DAEMON_NAME) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
control_service("restart", daemon=DAEMON_NAME) | |
control_service('restart', daemon=DAEMON_NAME) |
All the suggestions made by the reviewers, as they are not critical, will be implemented as part of the issue #2184 after integrating this PR. |
LGTM. GJ Everyone. |
Description
As part of the epic #2050, we created all the necessary changes to cope with the new feature developed in wazuh/wazuh#9550.
In this PR we:
Tests
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.