Skip to content

Commit

Permalink
Fix test broke by #131
Browse files Browse the repository at this point in the history
  • Loading branch information
iamjpotts committed Aug 31, 2023
1 parent 94cc569 commit cb16c0e
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions ipfs-api/tests/test_support/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,8 @@ use std::time::Duration;
use ipfs_api::response::VersionResponse;
use ipfs_api::{IpfsApi, IpfsClient, TryFromUri};

#[cfg(feature = "with-hyper")]
use hyper::client::HttpConnector;

#[cfg(feature = "with-hyper-tls")]
use hyper_tls::HttpsConnector;

cfg_if::cfg_if! {
if #[cfg(feature = "with-actix")] {
pub fn build_client(api_url: &str) -> IpfsClient {
IpfsClient::from_str(api_url).unwrap()
}
} else if #[cfg(feature = "with-hyper-tls")] {
pub fn build_client(api_url: &str) -> IpfsClient<HttpsConnector<HttpConnector>> {
IpfsClient::from_str(api_url).unwrap()
}
} else if #[cfg(feature = "with-hyper")] {
pub fn build_client(api_url: &str) -> IpfsClient<HttpConnector> {
IpfsClient::from_str(api_url).unwrap()
}
}
pub fn build_client(api_url: &str) -> IpfsClient {
IpfsClient::from_str(api_url).unwrap()
}

pub async fn wait_for_server<C: IpfsApi>(client: &C) -> Result<VersionResponse, String> {
Expand Down

0 comments on commit cb16c0e

Please sign in to comment.