From b74ac420183d74edd39149cf110f9a6a13bd48ee Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Tue, 30 Jun 2026 12:06:34 +0200 Subject: [PATCH] Install the rustls crypto provider in the handlers test setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Building the HTTP client now relies on a process-level rustls crypto provider being installed (we no longer pass a pre-configured TLS config that bundled one). Tests going through TestState that didn't call setup() — e.g. the login_sso_redirect tests — panicked when building the client. Call setup() from from_pool_with_site_config so every TestState installs the provider. --- crates/handlers/src/test_utils.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/handlers/src/test_utils.rs b/crates/handlers/src/test_utils.rs index b24a22889..7f118ad41 100644 --- a/crates/handlers/src/test_utils.rs +++ b/crates/handlers/src/test_utils.rs @@ -170,6 +170,11 @@ impl TestState { pool: PgPool, site_config: SiteConfig, ) -> Result { + // Make sure the rustls crypto provider and tracing are set up, as + // building the HTTP client below requires a process-level provider to + // be installed. + setup(); + let workspace_root = workspace_root(); let task_tracker = TaskTracker::new();