Improve metrics acceptance test failure messages

This commit is contained in:
teor 2020-12-03 07:49:34 +10:00 committed by Deirdre Connolly
parent c04cc39a03
commit e4525d8ee2
1 changed files with 3 additions and 2 deletions

View File

@ -770,8 +770,9 @@ async fn metrics_endpoint() -> Result<()> {
assert!(res.status().is_success());
let body = hyper::body::to_bytes(res).await?;
assert!(std::str::from_utf8(&body)
.unwrap()
.contains("metrics snapshot"));
.expect("metrics response is valid UTF-8")
.contains("metrics snapshot"),
"metrics exporter returns data in the expected format");
child.kill()?;