mirror of
https://github.com/GH05TCREW/MetasploitMCP.git
synced 2026-07-01 14:28:33 -04:00
1aec6127e6
- Add RPC_CALL_TIMEOUT (30s) constant for RPC operations - Wrap list_exploits and list_payloads with asyncio.wait_for to prevent hanging - Add timeout handling to list_active_sessions and list_listeners - Add timeout handling to health check endpoint - Improve error messages with specific timeout information - Add debug logging for RPC calls to help diagnose communication issues - Add check_msf_connection() helper function for connection status - Add comprehensive timeout error handling with user-friendly messages Fixes issue where list_exploits call would hang for 3+ minutes when Metasploit server is slow or unresponsive. Now fails fast with clear error message after 30 second timeout.
39 lines
827 B
INI
39 lines
827 B
INI
[tool:pytest]
|
|
# Pytest configuration for MetasploitMCP
|
|
|
|
# Test discovery
|
|
testpaths = tests
|
|
python_files = test_*.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
|
|
# Output and reporting
|
|
addopts =
|
|
-v
|
|
--tb=short
|
|
--strict-markers
|
|
--disable-warnings
|
|
--cov=MetasploitMCP
|
|
--cov-report=term-missing
|
|
--cov-report=html:htmlcov
|
|
--cov-fail-under=80
|
|
|
|
# Async test support
|
|
asyncio_mode = auto
|
|
|
|
# Markers
|
|
markers =
|
|
unit: Unit tests for individual functions
|
|
integration: Integration tests for full workflows
|
|
slow: Tests that take longer to run
|
|
network: Tests that require network access (disabled by default)
|
|
|
|
# Minimum version
|
|
minversion = 7.0
|
|
|
|
# Filter warnings
|
|
filterwarnings =
|
|
ignore::DeprecationWarning
|
|
ignore::PendingDeprecationWarning
|
|
ignore:.*unclosed.*:ResourceWarning
|