From 6a9eea34a04cecb7f58c414336563db76f040116 Mon Sep 17 00:00:00 2001 From: ZheFox <77232781+zhefox@users.noreply.github.com> Date: Sun, 23 Aug 2026 04:00:16 +0800 Subject: [PATCH] test(gateway): fix Codex Realtime route fixture --- .../src/handlers/proxy/websocket/live/http.rs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/apps/aether-gateway/src/handlers/proxy/websocket/live/http.rs b/apps/aether-gateway/src/handlers/proxy/websocket/live/http.rs index 2d8e46cb6..1935d1cbf 100644 --- a/apps/aether-gateway/src/handlers/proxy/websocket/live/http.rs +++ b/apps/aether-gateway/src/handlers/proxy/websocket/live/http.rs @@ -1060,13 +1060,28 @@ mod tests { #[tokio::test] async fn codex_realtime_call_remains_on_the_live_handler() { - let decision = GatewayControlDecision::synthetic( + let mut decision = GatewayControlDecision::synthetic( "/v1/realtime/calls", Some("ai_public".to_string()), Some("codex".to_string()), Some("live".to_string()), Some("codex:live".to_string()), ); + decision.auth_context = Some(GatewayControlAuthContext { + user_id: "user-codex-realtime".to_string(), + api_key_id: "key-codex-realtime".to_string(), + username: Some("codex-realtime".to_string()), + api_key_name: Some("codex-realtime".to_string()), + balance_remaining: None, + access_allowed: true, + user_rate_limit: None, + api_key_rate_limit: None, + api_key_is_standalone: true, + admin_bypass_limits: false, + local_rejection: None, + allowed_models: None, + ip_rules: None, + }); let request_context = GatewayPublicRequestContext { trace_id: "trace-codex-realtime-call".to_string(), request_method: http::Method::POST,