chore: expose codex_home via Config (#941)

This commit is contained in:
Michael Bolin
2025-05-15 00:30:13 -07:00
committed by GitHub
parent 0b9ef93da5
commit 5fc9fc3e3e
10 changed files with 212 additions and 98 deletions

View File

@@ -5,10 +5,12 @@ use std::time::Duration;
use codex_core::Codex;
use codex_core::ModelProviderInfo;
use codex_core::config::Config;
use codex_core::exec::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
use codex_core::protocol::InputItem;
use codex_core::protocol::Op;
mod test_support;
use tempfile::TempDir;
use test_support::load_default_config_for_test;
use tokio::time::timeout;
use wiremock::Mock;
use wiremock::MockServer;
@@ -96,7 +98,8 @@ async fn retries_on_early_close() {
};
let ctrl_c = std::sync::Arc::new(tokio::sync::Notify::new());
let mut config = Config::load_default_config_for_test();
let codex_home = TempDir::new().unwrap();
let mut config = load_default_config_for_test(&codex_home);
config.model_provider = model_provider;
let (codex, _init_id) = Codex::spawn(config, ctrl_c).await.unwrap();