-
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
Vulnerability Detector Syscollector initial scan E2E tests #4703
Merged
Rebits
merged 76 commits into
enhacement/4369-vulnerability-detector-e2e-tests
from
enhacement/4590-vd-basic-test-cases-syscollector-scan
Nov 29, 2023
Merged
Vulnerability Detector Syscollector initial scan E2E tests #4703
Rebits
merged 76 commits into
enhacement/4369-vulnerability-detector-e2e-tests
from
enhacement/4590-vd-basic-test-cases-syscollector-scan
Nov 29, 2023
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
This was referenced Nov 20, 2023
Enhance macOS deployment ansible taks
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by: Julia Magan <[email protected]>
Co-authored-by Julia Magan <[email protected]>
Co-authored-by Julia Magan <[email protected]>
Co-authored-by Julia Magan <[email protected]>
Co-authored-by Julia Magan <[email protected]>
Co-authored-by Julia Magan <[email protected]>
Co-authored-by Julia Magan <[email protected]>
Currently performing testing after changes |
juliamagan
approved these changes
Nov 29, 2023
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.
LGTM
Rebits
merged commit Nov 29, 2023
9871e3c
into
enhacement/4369-vulnerability-detector-e2e-tests
0 of 2 checks passed
Rebits
deleted the
enhacement/4590-vd-basic-test-cases-syscollector-scan
branch
November 29, 2023 18:02
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
This pull request introduces the initial set of end-to-end (E2E) tests for the Vulnerability Detector module. These tests ensure the proper functionality of the Vulnerability and Syscollector modules in the early stages of the environment. The primary objective is to validate that agents initiate Syscollector scans, generating the expected vulnerabilities, without involving any package installation, removal, or upgrade operations in the environment.
Context
These tests are integral to the ongoing refactoring of the Vulnerability Detector module. Their purpose is to guarantee that the module functions correctly, aligning with the refactoring requirements.
This pull request establishes the foundational steps and essential tools required to proceed with the development of the complete test suite. For more detailed information about the test context, refer to GitHub Issue #4369.
Implemented Cases
The test cases were designed and defined in GitHub Issue #4531 using Gherkin syntax. Two scenarios are covered:
Scenario 1: First Syscollector Scan (Rsync)
Scenario 2: Subsequent Scan (Dbsync) without any Installation
Test Environment
The test environment specifications can be found in GitHub Issue #4582. The environment includes multiple hosts with various roles and operating systems.
Vulnerability Detector E2E tests
How to Launch
Implementation Details
Setup Environment
Host Manager Session Fixture
All E2E Vulnerability detector tests will use the host_manager test, returning the HostManager object handling all instance operations. Sharing the same object in a fixture makes it easier to maintain and handle the environments.
Setup Fixture
This fixture prepares the environment by:
Test
The test checks the following:
Note
A basic logger for the test has been created using the live log of pytest parameters --log-cli. To increase the default logging level (ERROR, specified in pytest.ini), use --log-cli-level=debug.
Warning
Development was not done following a TDD approach. Some checks might not be fully implemented.
Changes Made in Wazuh QA Framework
New Modules Included
Included a Basic Logger for E2E Tests
Vulnerability detectors E2E tests now have their own logger.
Change Default Enrollment Name in All Hosts
Now agents will be registered using the inventory name.
Known Issues/Limitations
Most of the functionality included in this issue should be performed following an Object-Oriented Programming (OOP) approach instead of using the HostManager class. However, these tests should be refactored in the future when the Framework (present in the qa-system-framework repo) is migrated to this repository.
Future Work
After development is ready for review, it would be necessary to adapt the test in order to:
Testing performed