Skip to content

Commit 50b2b39

Browse files
committed
Print failed response body in integration tests
Signed-off-by: Lann Martin <[email protected]>
1 parent 29fed29 commit 50b2b39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,11 @@ mod integration_tests {
639639
expected: u16,
640640
) -> Result<()> {
641641
let res = req(s, absolute_uri).await?;
642-
assert_eq!(res.status(), expected);
642+
let status = res.status();
643+
let body = hyper::body::to_bytes(res.into_body())
644+
.await
645+
.expect("read body");
646+
assert_eq!(status, expected, "{}", String::from_utf8_lossy(&body));
643647

644648
Ok(())
645649
}

0 commit comments

Comments
 (0)