undo default client diff

This commit is contained in:
kevin zhao
2025-11-20 15:15:10 -05:00
parent e21e79cfc0
commit bd37d0dbe6
+3 -8
View File
@@ -288,7 +288,7 @@ mod tests {
#[test]
fn test_get_codex_user_agent() {
let user_agent = get_codex_user_agent();
assert!(user_agent.starts_with(&format!("{}/", originator().value)));
assert!(user_agent.starts_with("codex_cli_rs/"));
}
#[tokio::test]
@@ -329,10 +329,7 @@ mod tests {
let originator_header = headers
.get("originator")
.expect("originator header missing");
assert_eq!(
originator_header.to_str().unwrap(),
originator().value.as_str()
);
assert_eq!(originator_header.to_str().unwrap(), "codex_cli_rs");
// User-Agent matches the computed Codex UA for that originator
let expected_ua = get_codex_user_agent();
@@ -368,11 +365,9 @@ mod tests {
#[cfg(target_os = "macos")]
fn test_macos() {
use regex_lite::Regex;
let originator = originator().value.clone();
let user_agent = get_codex_user_agent();
let re = Regex::new(
format!(r"^{originator}/\d+\.\d+\.\d+ \(Mac OS \d+\.\d+\.\d+; (x86_64|arm64)\) (\S+)$")
.as_str(),
r"^codex_cli_rs/\d+\.\d+\.\d+ \(Mac OS \d+\.\d+\.\d+; (x86_64|arm64)\) (\S+)$",
)
.unwrap();
assert!(re.is_match(&user_agent));