Skip to content

Commit a254fc4

Browse files
committed
chore: fix compatibility suite
1 parent 57b4273 commit a254fc4

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

compatibility-suite/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ pact_consumer = { version = "~1.4.9" }
2020
regex = "1.10.2"
2121
reqwest = { version = "0.13.4", default-features = false, features = ["json"] }
2222
rocket = { version = "0.5.0", features = ["json"] }
23+
rustls = { version = "0.23.43", features = ["ring"] }
2324
serde = { version = "1.0", features = ["derive"] }
2425
serde_json = "1.0.108"
2526
sxd-document = "0.3.2"

compatibility-suite/tests/shared_steps/consumer.rs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ fn the_following_http_interactions_have_been_setup(world: &mut ConsumerWorld, st
6565
#[when(expr = "the mock server is started with interaction {int}")]
6666
async fn the_mock_server_is_started_with_interaction(world: &mut ConsumerWorld, interaction: usize) -> anyhow::Result<()> {
6767
if rustls::crypto::CryptoProvider::get_default().is_none() {
68-
if let Err(_) = rustls::crypto::ring::default_provider().install_default() {
69-
warn!("failed to installed the default crypto provider");
70-
}
68+
let _ = rustls::crypto::ring::default_provider().install_default();
7169
}
7270

7371
let pact = RequestResponsePact {
@@ -107,9 +105,7 @@ async fn the_mock_server_is_started_with_interaction_but_with_the_following_chan
107105
interaction: usize
108106
) -> anyhow::Result<()> {
109107
if rustls::crypto::CryptoProvider::get_default().is_none() {
110-
if let Err(_) = rustls::crypto::ring::default_provider().install_default() {
111-
warn!("failed to installed the default crypto provider");
112-
}
108+
let _ = rustls::crypto::ring::default_provider().install_default();
113109
}
114110

115111
let mut request_response_interaction = world.interactions
@@ -175,9 +171,7 @@ async fn the_mock_server_is_started_with_interaction_but_with_the_following_chan
175171
#[when(expr = "the mock server is started with interactions {string}")]
176172
async fn the_mock_server_is_started_with_interactions(world: &mut ConsumerWorld, ids: String) -> anyhow::Result<()> {
177173
if rustls::crypto::CryptoProvider::get_default().is_none() {
178-
if let Err(_) = rustls::crypto::ring::default_provider().install_default() {
179-
warn!("failed to installed the default crypto provider");
180-
}
174+
let _ = rustls::crypto::ring::default_provider().install_default();
181175
}
182176

183177
let interactions = ids.split(",")

0 commit comments

Comments
 (0)