This commit is contained in:
Eason Goodale
2025-08-08 19:24:21 -07:00
parent b1a93a06f0
commit df17f64784
4 changed files with 5 additions and 8 deletions

View File

@@ -1,4 +1,3 @@
use std::path::Path;
use std::process::Child;
use std::process::Stdio;

View File

@@ -38,7 +38,7 @@ pub struct LoginServerOptions {
pub testing_timeout_secs: Option<u64>,
pub verbose: bool,
#[cfg(feature = "http-e2e-tests")]
pub port_sender: Option<std::sync::mpsc::Sender<u16>>,
pub port_sender: Option<std::sync::mpsc::Sender<u16>>,
}
// Only default issuer supported for platform/api bases
@@ -81,8 +81,8 @@ pub fn run_local_login_server_with_options(mut opts: LoginServerOptions) -> std:
let _ = tx.send(actual_port);
}
let server = Server::from_listener(listener, None)
.map_err(|e| std::io::Error::other(e.to_string()))?;
let server =
Server::from_listener(listener, None).map_err(|e| std::io::Error::other(e.to_string()))?;
let issuer = opts.issuer.clone();
let url_base = default_url_base(opts.port);

View File

@@ -7,5 +7,3 @@ pub fn make_fake_jwt(payload: serde_json::Value) -> String {
let signature_b64 = b64(b"sig");
format!("{header_b64}.{payload_b64}.{signature_b64}")
}

View File

@@ -5,11 +5,11 @@ use codex_login::run_local_login_server_with_options;
use std::thread;
use std::time::Duration;
use tempfile::TempDir;
use wiremock::matchers::method;
use wiremock::matchers::path;
use wiremock::Mock;
use wiremock::MockServer;
use wiremock::ResponseTemplate;
use wiremock::matchers::method;
use wiremock::matchers::path;
async fn start_mock_oauth_server(behavior: MockBehavior) -> MockServer {
let server = MockServer::start().await;