Skip to content

Commit

Permalink
tests: fatal on BGP error
Browse files Browse the repository at this point in the history
  • Loading branch information
hack3ric committed Jan 16, 2025
1 parent 08d00da commit ec70e0a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ async fn run(
result = bgp.process() => match result {
Ok(()) => {}
Err(bgp::Error::Io(error)) if error.kind() == UnexpectedEof => warn!("remote closed"),
#[cfg(not(test))]
Err(e @ (bgp::Error::Notification(_) | bgp::Error::Remote(_))) => error!("BGP error: {e}"),
#[cfg(test)]
Err(bgp::Error::Notification(_) | bgp::Error::Remote(_)) => result.context("BGP error")?,
Err(_) => result.context("failed to process BGP")?,
},
result = ipc.accept() => {
Expand Down

0 comments on commit ec70e0a

Please sign in to comment.