mirror of
https://github.com/gbrigandi/mcp-server-wazuh.git
synced 2025-12-22 04:52:19 -06:00
fixed minor issues with passing configuration as environment variables.
This commit is contained in:
@@ -19,10 +19,14 @@ impl McpStdioClient {
|
||||
fn start() -> Result<Self, Box<dyn std::error::Error>> {
|
||||
let mut child = Command::new("cargo")
|
||||
.args(["run", "--bin", "mcp-server-wazuh"])
|
||||
.env("WAZUH_HOST", "nonexistent.example.com") // Use non-existent host
|
||||
.env("WAZUH_PORT", "9999")
|
||||
.env("WAZUH_USER", "test")
|
||||
.env("WAZUH_PASS", "test")
|
||||
.env("WAZUH_API_HOST", "nonexistent.example.com") // Use non-existent host
|
||||
.env("WAZUH_API_PORT", "9999")
|
||||
.env("WAZUH_API_USER", "test")
|
||||
.env("WAZUH_API_PASS", "test")
|
||||
.env("WAZUH_INDEXER_HOST", "nonexistent.example.com") // Use non-existent host
|
||||
.env("WAZUH_INDEXER_PORT", "8888")
|
||||
.env("WAZUH_INDEXER_USER", "test")
|
||||
.env("WAZUH_INDEXER_PASS", "test")
|
||||
.env("VERIFY_SSL", "false")
|
||||
.env("RUST_LOG", "error") // Minimize logging noise
|
||||
.stdin(Stdio::piped())
|
||||
|
||||
@@ -26,10 +26,10 @@ impl McpServerProcess {
|
||||
fn start_with_mock_wazuh(mock_server: &MockWazuhServer) -> Result<Self, Box<dyn std::error::Error>> {
|
||||
let mut child = Command::new("cargo")
|
||||
.args(["run", "--bin", "mcp-server-wazuh"])
|
||||
.env("WAZUH_HOST", mock_server.host())
|
||||
.env("WAZUH_PORT", mock_server.port().to_string())
|
||||
.env("WAZUH_USER", "admin")
|
||||
.env("WAZUH_PASS", "admin")
|
||||
.env("WAZUH_INDEXER_HOST", mock_server.host())
|
||||
.env("WAZUH_INDEXER_PORT", mock_server.port().to_string())
|
||||
.env("WAZUH_INDEXER_USER", "admin")
|
||||
.env("WAZUH_INDEXER_PASS", "admin")
|
||||
.env("VERIFY_SSL", "false")
|
||||
.env("WAZUH_TEST_PROTOCOL", "http")
|
||||
.env("RUST_LOG", "warn") // Reduce noise in tests
|
||||
|
||||
Reference in New Issue
Block a user