Skip to content

Commit

Permalink
Merge pull request #1514 from andyleiserson/fix-test
Browse files Browse the repository at this point in the history
Fix input_from_url test
  • Loading branch information
andyleiserson authored Dec 20, 2024
2 parents c49d3f9 + 4d41274 commit 291efab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ipa-core/src/net/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub enum Error {
status: hyper::StatusCode,
reason: String,
},
#[error("Failed to connect to {dest}: {inner}")]
#[error("Failed to connect to {dest}: {inner:?}")]
ConnectError {
dest: String,
#[source]
Expand Down
2 changes: 1 addition & 1 deletion ipa-core/src/net/query_input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub async fn stream_query_input_from_url(uri: &Uri) -> Result<BodyStream, Error>
HttpsConnectorBuilder::default()
.with_native_roots()
.expect("System truststore is required")
.https_only()
.https_or_http()
.enable_all_versions()
.build(),
);
Expand Down
5 changes: 2 additions & 3 deletions ipa-core/src/net/server/handlers/query/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mod tests {
#[tokio::test(flavor = "multi_thread")]
async fn input_from_url() {
const QUERY_ID: QueryId = QueryId;
const DATA: &str = "input records";
const DATA: &str = "<input records>";

let server = tiny_http::Server::http("localhost:0").unwrap();
let addr = server.server_addr();
Expand All @@ -124,9 +124,8 @@ mod tests {
.await;

let url = format!(
"http://localhost:{}{}/{QUERY_ID}/input",
"http://localhost:{}/input-data",
addr.to_ip().unwrap().port(),
http_serde::query::BASE_AXUM_PATH,
);
let req = http_serde::query::input::Request::new(QueryInput::FromUrl {
query_id: QUERY_ID,
Expand Down

0 comments on commit 291efab

Please sign in to comment.