Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1442,6 +1442,7 @@ dependencies = [
"linkerd-app-core",
"linkerd-app-test",
"linkerd-http-access-log",
"linkerd-http-body-compat",
"linkerd-http-metrics",
"linkerd-idle-cache",
"linkerd-io",
Expand Down
1 change: 1 addition & 0 deletions linkerd/app/inbound/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ linkerd-meshtls-rustls = { path = "../../meshtls/rustls", features = [
[dev-dependencies]
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
linkerd-app-test = { path = "../test" }
linkerd-http-body-compat = { path = "../../http/body-compat" }
linkerd-http-metrics = { path = "../../http/metrics", features = ["test-util"] }
linkerd-idle-cache = { path = "../../idle-cache", features = ["test-util"] }
linkerd-io = { path = "../../io", features = ["tokio-test"] }
Expand Down
14 changes: 10 additions & 4 deletions linkerd/app/inbound/src/http/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use linkerd_app_core::{
classify,
errors::header::L5D_PROXY_ERROR,
identity, io, metrics,
proxy::http::{self, Body as _, BoxBody},
proxy::http::{self, BoxBody},
svc::{self, http::TracingExecutor, NewService, Param},
tls,
transport::{ClientAddr, OrigDstAddr, Remote, ServerAddr},
Expand Down Expand Up @@ -631,15 +631,21 @@ async fn grpc_response_class() {
.body(hyper::Body::default())
.unwrap();

let mut rsp = client
let rsp = client
.send_request(req)
.await
.expect("HTTP client request failed");
tracing::info!(?rsp);
assert_eq!(rsp.status(), http::StatusCode::OK);

rsp.body_mut().data().await;
let trls = rsp.body_mut().trailers().await.unwrap().unwrap();
let mut body = linkerd_http_body_compat::ForwardCompatibleBody::new(rsp.into_body());
let trls = body
.frame()
.await
.unwrap()
.unwrap()
.into_trailers()
.expect("trailers frame");
assert_eq!(trls.get("grpc-status").unwrap().to_str().unwrap(), "2");

let response_total = metrics
Expand Down
Loading