mirror of
https://github.com/openai/codex.git
synced 2026-11-25 23:30:49 +00:00
codex: align tests with lenient config enums
Update test expectations after invalid enum values no longer fail whole config deserialization. Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -3446,7 +3446,7 @@ async fn managed_config_overrides_oauth_store_mode() -> anyhow::Result<()> {
|
||||
assert_eq!(
|
||||
cfg.mcp_oauth_credentials_store
|
||||
.clone()
|
||||
.and_then(|value| value.into_valid()),
|
||||
.and_then(codex_config::Lenient::into_valid),
|
||||
Some(OAuthCredentialsStoreMode::Keyring),
|
||||
);
|
||||
|
||||
@@ -4573,7 +4573,7 @@ async fn set_model_updates_defaults() -> anyhow::Result<()> {
|
||||
assert_eq!(
|
||||
parsed
|
||||
.model_reasoning_effort
|
||||
.and_then(|value| value.into_valid()),
|
||||
.and_then(codex_config::Lenient::into_valid),
|
||||
Some(ReasoningEffort::High)
|
||||
);
|
||||
|
||||
@@ -4609,7 +4609,7 @@ model = "gpt-4.1"
|
||||
assert_eq!(
|
||||
parsed
|
||||
.model_reasoning_effort
|
||||
.and_then(|value| value.into_valid()),
|
||||
.and_then(codex_config::Lenient::into_valid),
|
||||
Some(ReasoningEffort::High)
|
||||
);
|
||||
assert_eq!(
|
||||
@@ -4645,7 +4645,7 @@ async fn set_model_updates_profile() -> anyhow::Result<()> {
|
||||
profile
|
||||
.model_reasoning_effort
|
||||
.clone()
|
||||
.and_then(|value| value.into_valid()),
|
||||
.and_then(codex_config::Lenient::into_valid),
|
||||
Some(ReasoningEffort::Medium)
|
||||
);
|
||||
|
||||
@@ -4688,7 +4688,7 @@ model = "gpt-5.4"
|
||||
dev_profile
|
||||
.model_reasoning_effort
|
||||
.clone()
|
||||
.and_then(|value| value.into_valid()),
|
||||
.and_then(codex_config::Lenient::into_valid),
|
||||
Some(ReasoningEffort::Medium)
|
||||
);
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use tokio::io::AsyncWriteExt;
|
||||
const TEST_TIMESTAMP: &str = "2025-01-01T00-00-00";
|
||||
|
||||
fn valid_lenient<T>(value: Option<Lenient<T>>) -> Option<T> {
|
||||
value.and_then(|value| value.into_valid())
|
||||
value.and_then(Lenient::into_valid)
|
||||
}
|
||||
|
||||
async fn read_config_toml(codex_home: &Path) -> io::Result<ConfigToml> {
|
||||
|
||||
Reference in New Issue
Block a user