test(desktop): make MCP config path assertions portable

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
Will Pfleger
2026-07-12 21:14:40 -04:00
parent 09a9263bff
commit 42959fa8d1
2 changed files with 14 additions and 5 deletions

View File

@@ -198,7 +198,8 @@ const overrides = new Map([
// loginHint fields on AcpRuntimeCatalogEntry (+14 lines). Load-bearing new feature.
// agent-lifecycle-fixes: GlobalAgentConfigSaveResult type grows with
// failed_restart_count (+2 lines). Queued to split with the rest of this list.
["src/shared/api/types.ts", 1030],
// mcp-readonly-view rebase: PR2 MCP config surface FE-type fields force +1 over the grandfathered ceiling.
["src/shared/api/types.ts", 1031],
// readiness-gate: PersonaDialog.tsx threads computeLocalModeGate +
// requiredCredentialEnvKeys + RequiredFieldLabel so the "New agent" dialog
// shows required markers and credential amber rows (parity with

View File

@@ -2,7 +2,7 @@
//! `reader.rs` stays under the 1000-line budget; `#[path]`-included from
//! there).
use std::{collections::BTreeMap, sync::Mutex};
use std::{collections::BTreeMap, path::Path, sync::Mutex};
use super::*;
use crate::managed_agents::discovery::KnownAcpRuntime;
@@ -142,8 +142,9 @@ fn surface_reports_mcp_specific_config_path() {
.sources
.mcp_config_file_path
.expect("mcp config path");
let expected_suffix = Path::new(".config").join("goose").join("config.yaml");
assert!(
path.ends_with(".config/goose/config.yaml"),
Path::new(&path).ends_with(&expected_suffix),
"unexpected MCP config path: {path}"
);
}
@@ -156,9 +157,16 @@ fn goose_mcp_config_path_follows_path_root_override() {
read_config_surface(&record, Some(runtime), None, None)
});
let expected_path = Path::new("/tmp/buzz-goose-root")
.join("config")
.join("config.yaml");
assert_eq!(
surface.sources.mcp_config_file_path.as_deref(),
Some("/tmp/buzz-goose-root/config/config.yaml")
surface
.sources
.mcp_config_file_path
.as_deref()
.map(Path::new),
Some(expected_path.as_path())
);
}