Skip to content

Commit e64d7bf

Browse files
committed
Print failed response body in integration tests
Signed-off-by: Lann Martin <lann.martin@fermyon.com>
1 parent a9d4c95 commit e64d7bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integration.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,11 @@ mod integration_tests {
647647
expected: u16,
648648
) -> Result<()> {
649649
let res = req(s, absolute_uri).await?;
650-
assert_eq!(res.status(), expected);
650+
let status = res.status();
651+
let body = hyper::body::to_bytes(res.into_body())
652+
.await
653+
.expect("read body");
654+
assert_eq!(status, expected, "{}", String::from_utf8_lossy(&body));
651655

652656
Ok(())
653657
}

0 commit comments

Comments
 (0)