Fix integration tests for claude (#35212)

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga 2025-07-28 13:18:01 -03:00 committed by GitHub
parent 5e2da042ef
commit fd68265efd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 73 additions and 16 deletions

View file

@ -1,6 +1,6 @@
use acp_thread::AcpThread;
use agent_client_protocol as acp;
use anyhow::{Context, Result};
use anyhow::Result;
use context_server::listener::{McpServerTool, ToolResponse};
use context_server::types::{
Implementation, InitializeParams, InitializeResponse, ProtocolVersion, ServerCapabilities,
@ -38,8 +38,14 @@ impl ZedMcpServer {
}
pub fn server_config(&self) -> Result<acp::McpServerConfig> {
let zed_path = std::env::current_exe()
.context("finding current executable path for use in mcp_server")?;
#[cfg(not(test))]
let zed_path = anyhow::Context::context(
std::env::current_exe(),
"finding current executable path for use in mcp_server",
)?;
#[cfg(test)]
let zed_path = crate::e2e_tests::get_zed_path();
Ok(acp::McpServerConfig {
command: zed_path,