WIP fase 2b-3: rimozione sottosistemi solo-ChatGPT (plugin remoti, image gen, daybreak, cyber, attestation, cloud config, app/connettori) - test in corso
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,9 +8,7 @@ use ctor::ctor;
|
||||
use std::sync::OnceLock;
|
||||
use tempfile::TempDir;
|
||||
|
||||
use codex_config::CloudConfigBundleLoader;
|
||||
use codex_config::LoaderOverrides;
|
||||
use codex_config::test_support::CloudConfigBundleFixture;
|
||||
use codex_config::test_support::ManagedConfigFixture;
|
||||
use codex_core::CodexThread;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::config::ConfigBuilder;
|
||||
@@ -24,7 +22,7 @@ use regex_lite::Regex;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
|
||||
pub mod apps_test_server;
|
||||
pub mod mcp_test_server;
|
||||
#[cfg(unix)]
|
||||
pub mod code_mode_host;
|
||||
pub mod context_snapshot;
|
||||
@@ -199,31 +197,31 @@ pub fn fetch_dotslash_file(
|
||||
/// temporary directory. Using a per-test directory keeps tests hermetic and
|
||||
/// avoids clobbering a developer’s real `~/.codex`.
|
||||
pub async fn load_default_config_for_test(codex_home: &TempDir) -> Config {
|
||||
load_default_config_for_test_with_cloud_config_bundle(
|
||||
codex_home,
|
||||
CloudConfigBundleLoader::default(),
|
||||
)
|
||||
.await
|
||||
load_default_config_for_test_with_managed_config(codex_home, ManagedConfigFixture::default())
|
||||
.await
|
||||
}
|
||||
|
||||
/// Returns a default `Config` with test-provided cloud bundle requirements applied.
|
||||
/// during config construction.
|
||||
pub async fn load_default_config_for_test_with_cloud_config_bundle(
|
||||
/// Returns a default `Config` with test-provided local managed requirements and
|
||||
/// config applied. The fixture is written below `codex_home` and loaded as the
|
||||
/// system `requirements.toml` / `config.toml`.
|
||||
pub async fn load_default_config_for_test_with_managed_config(
|
||||
codex_home: &TempDir,
|
||||
cloud_config_bundle: CloudConfigBundleLoader,
|
||||
managed_config: ManagedConfigFixture,
|
||||
) -> Config {
|
||||
let loader_overrides = managed_config
|
||||
.loader_overrides_for_tests(codex_home.path())
|
||||
.expect("managed config fixture should be writable");
|
||||
ConfigBuilder::default()
|
||||
.loader_overrides(LoaderOverrides::without_managed_config_for_tests())
|
||||
.loader_overrides(loader_overrides)
|
||||
.codex_home(codex_home.path().to_path_buf())
|
||||
.harness_overrides(default_test_overrides())
|
||||
.cloud_config_bundle(cloud_config_bundle)
|
||||
.build()
|
||||
.await
|
||||
.expect("defaults for test should always succeed")
|
||||
}
|
||||
|
||||
pub fn managed_network_requirements_loader() -> CloudConfigBundleLoader {
|
||||
CloudConfigBundleFixture::loader_with_enterprise_requirement(
|
||||
pub fn managed_network_requirements() -> ManagedConfigFixture {
|
||||
ManagedConfigFixture::requirements(
|
||||
r#"
|
||||
[experimental_network]
|
||||
enabled = true
|
||||
|
||||
Reference in New Issue
Block a user