mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
Update Codex provider migration test expectations
This commit is contained in:
@@ -210,7 +210,7 @@ experimental_bearer_token = "stored-bearer-key"
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn sync_codex_provider_preserves_live_model_provider_id_for_history() {
|
||||
fn sync_codex_provider_preserves_user_model_provider_id_after_migration() {
|
||||
let _guard = test_mutex().lock().expect("acquire test mutex");
|
||||
reset_test_fs();
|
||||
|
||||
@@ -264,8 +264,8 @@ requires_openai_auth = true
|
||||
|
||||
assert_eq!(
|
||||
parsed.get("model_provider").and_then(|v| v.as_str()),
|
||||
Some("custom"),
|
||||
"legacy ConfigService sync should collapse third-party providers into the stable \"custom\" history bucket"
|
||||
Some("aihubmix"),
|
||||
"ConfigService sync should preserve user-editable model_provider after the one-time migration"
|
||||
);
|
||||
|
||||
let model_providers = parsed
|
||||
@@ -273,12 +273,12 @@ requires_openai_auth = true
|
||||
.and_then(|v| v.as_table())
|
||||
.expect("model_providers should exist");
|
||||
assert!(
|
||||
model_providers.get("aihubmix").is_none(),
|
||||
"provider-specific target id should not be written to live config"
|
||||
model_providers.get("custom").is_none(),
|
||||
"provider sync should not force user-edited provider ids back to custom"
|
||||
);
|
||||
assert_eq!(
|
||||
model_providers
|
||||
.get("custom")
|
||||
.get("aihubmix")
|
||||
.and_then(|v| v.get("base_url"))
|
||||
.and_then(|v| v.as_str()),
|
||||
Some("https://aihubmix.example/v1")
|
||||
|
||||
Reference in New Issue
Block a user