-
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
IT Wazuh DB: Add coverage to new commands #2653
IT Wazuh DB: Add coverage to new commands #2653
Conversation
Co-authored-by: Dámaris <seyla.gomez@wazuh.com>
This reverts commit 5154dde.
…/wazuh-qa into 2532-wazuh-db-commands
IT 2532- Test set_agent_groups WDB command
IT 2532 - Test get-groups-integrity WDB command
IT 2532- Test global backup WDB command and configs
Tests Results
|
def get_list_of_content_yml(file_path, filter, list=[]): | ||
"""Read a YAML file from a given path, return a list with the YAML data | ||
after apply filter | ||
|
||
Args: | ||
file_path (str): Path of the YAML file to be readed | ||
filter (str): filder to extract some part of yaml | ||
list: a list with previous information | ||
|
||
Returns: | ||
list: Yaml structure. | ||
""" | ||
list.append((read_yaml(file_path), file_path + filter)) | ||
return list | ||
|
||
|
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.
If we don't use this method
but this block is repeat on each test,
with open(messages_file) as f:
module_tests.append((yaml.safe_load(f), messages_file.split('_')[0]))
Could we add this content on a this method an use it on each test?
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.
applied requested change. refactored function that opens yaml file.
Approved
Description
New changes in Wazuh DB add new commands to cover:
Attached is the list of PRs who worked on each of the commands, there you can find in detail each of the implemented cases.
Configuration options
Local Internal Options: No Local Internal Options used
Required
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.