Skip to content

Commit c6eb66a

Browse files
authored
Merge pull request #379 from Kobzol/nicer-error
Make error message nicer when bors service panics in tests
2 parents c30ba84 + 7c7dedf commit c6eb66a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tests/mocks/bors.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ impl BorsBuilder {
8686

8787
match result {
8888
Ok(res) => match res {
89-
Ok(_) => gh_state.expect("Bors service has failed"),
89+
Ok(_) => gh_state
90+
.context("Bors service has failed")
91+
// This makes the error nicer
92+
.map_err(|e| e.to_string())
93+
.unwrap(),
9094
Err(error) => {
9195
panic!(
9296
"Test has failed: {error:?}\n\nBors service error: {:?}",

0 commit comments

Comments
 (0)