mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-09-17 01:35:01 +00:00
Install the rustls crypto provider in the handlers test setup
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.
This commit is contained in:
@@ -170,6 +170,11 @@ impl TestState {
|
||||
pool: PgPool,
|
||||
site_config: SiteConfig,
|
||||
) -> Result<Self, anyhow::Error> {
|
||||
// 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();
|
||||
|
||||
Reference in New Issue
Block a user