Skip to content

Commit

Permalink
add a test (not enough)
Browse files Browse the repository at this point in the history
  • Loading branch information
hatoo committed Jun 23, 2024
1 parent 7da90fb commit eb3c8dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ where
let proxy = http_mitm_proxy::MitmProxy::new(
if without_cert { None } else { Some(root_cert) },
tokio_native_tls::native_tls::TlsConnector::builder()
.request_alpns(&["h2", "http/1.1"])
.danger_accept_invalid_certs(true)
.danger_accept_invalid_hostnames(true)
.build()
Expand Down Expand Up @@ -244,6 +245,7 @@ async fn test_simple() {

let response = response.await.unwrap().unwrap();

assert_eq!(response.version(), hyper::http::Version::HTTP_11);
assert_eq!(response.status(), 200);
assert_eq!(response.bytes().await.unwrap().as_ref(), b"Hello, World!");

Expand Down

0 comments on commit eb3c8dc

Please sign in to comment.