Skip to content

Commit

Permalink
use the http::HeaderMap instead of dealing with string silliness
Browse files Browse the repository at this point in the history
  • Loading branch information
wlmyng committed Nov 22, 2024
1 parent dc45d8c commit 2f0e074
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/sui-graphql-e2e-tests/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ impl OffchainStateReader for OffchainReaderForAdapter {
.await?;

Ok(TestResponse {
http_headers: Some(format!("{:#?}", result.http_headers_without_date())),
http_headers: Some(result.http_headers_without_date()),
response_body: result.response_body_json_pretty(),
service_version: result.graphql_version().ok(),
})
Expand Down
1 change: 1 addition & 0 deletions crates/sui-transactional-test-runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ bcs.workspace = true
bimap.workspace = true
clap.workspace = true
eyre.workspace = true
http.workspace = true
once_cell.workspace = true
rand.workspace = true
regex.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-transactional-test-runner/src/offchain_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::time::Duration;

pub struct TestResponse {
pub response_body: String,
pub http_headers: Option<String>,
pub http_headers: Option<http::HeaderMap>,
pub service_version: Option<String>,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/sui-transactional-test-runner/src/test_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ impl<'a> MoveTestAdapter<'a> for SuiTestAdapter {

let mut output = vec![];
if show_headers {
output.push(format!("Headers: {:#?}", resp.http_headers));
output.push(format!("Headers: {:#?}", resp.http_headers.unwrap()));
}
if show_service_version {
output.push(format!(
Expand Down

0 comments on commit 2f0e074

Please sign in to comment.