Closed mauromalara closed 1 year ago
pytest.raises
PS C:\Users\vagrant\Downloads> net stop WazuhSvc
System error 109 has occurred.
The pipe has been ended.
Faulting application name: wazuh-agent.exe, version: 0.0.0.0, time stamp: 0x6373ef09
Faulting module name: KERNELBASE.dll, version: 10.0.17763.3650, time stamp: 0xa9404300
Exception code: 0xc00000fd
Fault offset: 0x0011bbe5
Faulting process id: 0x13d4
Faulting application start time: 0x01d8f9308838e236
Faulting application path: C:\Program Files (x86)\ossec-agent\wazuh-agent.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report Id: 144595fb-3a81-4d4d-8929-913dbcae5ed9
Faulting package full name:
Faulting package-relative application ID:
Test with the latest change ran locally for Windows but ran in Jenkins for Ubuntu, CentOS, and macOS.
Target | R1 | R2 | R3 | Commit |
---|---|---|---|---|
Agent (CentOS, Ubuntu, Windows, macOS) | 🔴 | 🔴 | 🔴 | d255282 |
Manager (CentOS) | 🟢 | 🟢 | 🟢 | d255282 |
Target | R1 | R2 | R3 | Commit |
---|---|---|---|---|
Agent (CentOS, Ubuntu, Windows, macOS) | 🟡 | 🟡 | 🟡 | f465ea8 |
Some tests were skipped but this is unwanted behavior, so a condition was added to the pytest marker.
Also, I change the timeout to 60 + 2 seconds. The conclusion was made after the following executions:
Target | R1 | R2 | R3 | Commit |
---|---|---|---|---|
Agent (CentOS, Ubuntu, Windows, macOS) | 🟢 | 🟢 | 🟢 | 71d6c79 |
Description
Add a test to check if the different combinations of configurations produce the desired results.
Test cases analysis & design
Analysis
> **Note**: Invalid values include empty valueDesign
- Verify that the module does not start when it's disabled - Verify that the scan starts after N seconds but no scan is triggered - Verify that the scan starts on startup and collects information, but no sync is performed and the scan starts again after 1 second (scanning only listening ports) - Verify that the scan starts on startup scanning all ports and synchronizing the DB at 10 EPS - Verify that the module doesn't start and show errors when invalid or empty options are configured (1 case per tag)