taler-rust

GNU Taler code in Rust. Largely core banking integrations.
Log | Files | Refs | Submodules | README | LICENSE

commit 14f571a7e85caf215a7e9995914026f064f488fe
parent ca7b6649e1003711ba0f7d28c3b40c55852fa63d
Author: Antoine A <>
Date:   Fri,  4 Sep 2026 13:57:18 +0200

test: keep request headers alongside the body

Diffstat:
Mcommon/taler-test-utils/src/server.rs | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/taler-test-utils/src/server.rs b/common/taler-test-utils/src/server.rs @@ -198,7 +198,7 @@ impl TestRequest { method, url, body: req_body, - headers, + headers: req_headers, } = self; let uri = Uri::try_from(url.as_str()).unwrap(); let mut req = axum::http::request::Builder::new() @@ -206,13 +206,14 @@ impl TestRequest { .uri(&uri) .body(req_body.clone().map(Body::from).unwrap_or_else(Body::empty)) .unwrap(); - *req.headers_mut() = headers; + *req.headers_mut() = req_headers.clone(); let resp = router.clone().oneshot(req).await.unwrap(); let (parts, body) = resp.into_parts(); let bytes = body.collect().await.unwrap(); TestResponse { router, req_body: req_body.unwrap_or_default(), + req_headers, res_body: bytes.to_bytes(), method, status: parts.status, @@ -233,6 +234,7 @@ impl IntoFuture for TestRequest { #[must_use] pub struct TestResponse { pub router: Router, + pub req_headers: HeaderMap, pub req_body: Bytes, res_body: Bytes, pub method: Method,