mirror of
https://github.com/openai/codex.git
synced 2026-05-04 03:16:31 +00:00
Fix plugin list workspace settings test isolation (#20086)
Fixes test that often fails locally when running `cargo test` - Add an app-server test helper that combines managed-config isolation with custom env overrides. - Isolate `HOME` / `USERPROFILE` in plugin-list workspace settings tests so host home marketplaces do not affect results.
This commit is contained in:
@@ -307,7 +307,15 @@ async fn plugin_list_returns_empty_when_workspace_codex_plugins_disabled() -> Re
|
||||
.mount(&server)
|
||||
.await;
|
||||
|
||||
let mut mcp = McpProcess::new_without_managed_config(codex_home.path()).await?;
|
||||
let home = codex_home.path().to_string_lossy().into_owned();
|
||||
let mut mcp = McpProcess::new_without_managed_config_with_env(
|
||||
codex_home.path(),
|
||||
&[
|
||||
("HOME", Some(home.as_str())),
|
||||
("USERPROFILE", Some(home.as_str())),
|
||||
],
|
||||
)
|
||||
.await?;
|
||||
timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
|
||||
|
||||
let request_id = mcp
|
||||
@@ -388,7 +396,15 @@ async fn plugin_list_reuses_cached_workspace_codex_plugins_setting() -> Result<(
|
||||
.mount(&server)
|
||||
.await;
|
||||
|
||||
let mut mcp = McpProcess::new_without_managed_config(codex_home.path()).await?;
|
||||
let home = codex_home.path().to_string_lossy().into_owned();
|
||||
let mut mcp = McpProcess::new_without_managed_config_with_env(
|
||||
codex_home.path(),
|
||||
&[
|
||||
("HOME", Some(home.as_str())),
|
||||
("USERPROFILE", Some(home.as_str())),
|
||||
],
|
||||
)
|
||||
.await?;
|
||||
timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
|
||||
|
||||
for _ in 0..2 {
|
||||
|
||||
Reference in New Issue
Block a user