mirror of
https://github.com/openai/codex.git
synced 2026-11-10 08:43:33 +00:00
Update tests for default-enabled update_plan (#41630)
## What changed - Cover the default, explicitly enabled, and explicitly disabled states of `tools.update_plan.enabled`. - Verify prompt tool lists remain consistent across requests, including when custom base and developer instructions are configured. - Explicitly enable `update_plan` in existing fixtures that depend on the tool. GitOrigin-RevId: 3be279cb5195dfc5892c2c8ff6a1461fac879309
This commit is contained in:
1 parent
dde85b435b
commit
28327355b8
20 files changed
+111
-24
No files matched your search
@@ -565,21 +565,24 @@ async fn load_config_resolves_non_prefixed_mcp_tool_servers() -> std::io::Result
|
||||
#[tokio::test]
|
||||
async fn load_config_resolves_update_plan_enabled() -> std::io::Result<()> {
|
||||
let codex_home = tempdir()?;
|
||||
let config_toml = toml::from_str(
|
||||
r#"
|
||||
[tools.update_plan]
|
||||
enabled = false
|
||||
"#,
|
||||
)
|
||||
.expect("TOML deserialization should succeed");
|
||||
let config = Config::load_from_base_config_with_overrides(
|
||||
config_toml,
|
||||
ConfigOverrides::default(),
|
||||
codex_home.abs(),
|
||||
)
|
||||
.await?;
|
||||
for (config_toml, expected_enabled) in [
|
||||
("", true),
|
||||
("[tools.update_plan]", true),
|
||||
("[tools.update_plan]\nenabled = false", false),
|
||||
("[tools.update_plan]\nenabled = true", true),
|
||||
] {
|
||||
let config = Config::load_from_base_config_with_overrides(
|
||||
toml::from_str(config_toml).expect("TOML deserialization should succeed"),
|
||||
ConfigOverrides::default(),
|
||||
codex_home.abs(),
|
||||
)
|
||||
.await?;
|
||||
|
||||
assert!(!config.update_plan_enabled);
|
||||
assert_eq!(
|
||||
config.update_plan_enabled, expected_enabled,
|
||||
"{config_toml}"
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user