Skip to content

Commit 212a561

Browse files
committed
Make sure webdav tests can run in isolation
1 parent e6306f4 commit 212a561

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/webdav.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ fn webdav_advertised_in_options(
5656
}
5757

5858
fn list_webdav(url: url::Url, path: &str) -> Result<Vec<ListEntity>, reqwest_dav::Error> {
59+
// Make sure that tests using this can run in isolation. For this, we need to make sure
60+
// that the crypto provider for rustls is initialized.
61+
if rustls::crypto::CryptoProvider::get_default().is_none() {
62+
let _ = rustls::crypto::ring::default_provider().install_default();
63+
}
64+
5965
let client = DavClientBuilder::new().set_host(url.to_string()).build()?;
6066

6167
let rt = tokio::runtime::Runtime::new().unwrap();

0 commit comments

Comments
 (0)