-
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 - WDB - 2532- Test set_agent_groups WDB command #2602
Merged
Merged
Conversation
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
damarisg
reviewed
Feb 24, 2022
tests/integration/test_wazuh_db/test_set_agent_groups/test_set_agent_groups.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Dámaris <seyla.gomez@wazuh.com>
damarisg
approved these changes
Feb 25, 2022
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.
Deblintrake09
changed the title
IT 2532- Test set_agent_groups WDB command
IT - WDB - 2532- Test set_agent_groups WDB command
Feb 25, 2022
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In this PR the test suite for
set_agent_groups
command is added. A total of 23 new test cases covering different modes and combinations of options.Cases for
set_agent_groups
command:- Add TestGroup1
- Empty groups - Agent has no groups - No groups added
- Empty groups - Agent has default group - No groups affected
- Add same group twice - Has only one group
- Two groups - Agent Has two groups
- Agent Has no groups. One Group is Added
- Agent Has no groups. No new groups added
- Agent Has one group. New group replaces old group
- Agent has Group - Pass no new group. Error - groups not affected
- Agent has one Group - Remove the group. Agent has default assigned
- Agent has TestGroup1 and TestGroup2 - Remove Tesgroup1. Agent has TestGroup2 assigned
- Agent has no groups - Try remove a group. Agent has default assigned
- sync_status Synced - Assign a group using Synced Sync Status - agent has TestGroup1 assigned
- Wrong sync_status - Assign a group using and invalid Sync_Status - agent has no group
- No sync_status - Assign a group using and empty Sync_Status field - agent has no group assigned
- Assign a group using without data field - agent has no group assigned
- Assign a group using without data groups field - agent has no group assigned
- Assign a group using without data id field - agent has no group assigned
- Assign a group using without source field - agent has TestGroup1 assigned
- Assign a group using without mode field - agent has no group assigned
- Assign a group using without sync_status field - agent has TestGroup1 assigned
Note: Form more case details, it can be checked in
set_agent_groups.yaml
file.Configuration options
Local Internal Options: No Local Internal Options used
Tests Results
Required
pycodestyle --max-line-length=120 --show-source --show-pep8 file.py
.