From ec6227c6cdc7b72c55827ca32d5970b74cd88c0c Mon Sep 17 00:00:00 2001 From: Ahmed Ibrahim Date: Mon, 27 Apr 2026 10:45:14 +0000 Subject: [PATCH] Stabilize OAuth persistence test Co-authored-by: Codex --- codex-rs/rmcp-client/src/oauth.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/codex-rs/rmcp-client/src/oauth.rs b/codex-rs/rmcp-client/src/oauth.rs index 4318b38e23..42962285b2 100644 --- a/codex-rs/rmcp-client/src/oauth.rs +++ b/codex-rs/rmcp-client/src/oauth.rs @@ -946,14 +946,13 @@ mod tests { persistor.persist_if_needed().await?; - assert_eq!( - super::load_oauth_tokens( - &tokens.server_name, - &tokens.url, - OAuthCredentialsStoreMode::File - )?, - Some(newer_tokens) - ); + let loaded = super::load_oauth_tokens( + &tokens.server_name, + &tokens.url, + OAuthCredentialsStoreMode::File, + )? + .expect("newer tokens should remain stored"); + assert_tokens_match_without_expiry(&loaded, &newer_tokens); Ok(()) }