From 775353f8cdfc7b9cad3873c9449d1338f76b03bf Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Sun, 27 Aug 2023 05:34:04 -0400 Subject: [PATCH] Add testing for Completed to coordinator e2e tests Two commits ago stubbed in support, sufficient for a honest-validator environment. --- tests/coordinator/src/tests/sign.rs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/coordinator/src/tests/sign.rs b/tests/coordinator/src/tests/sign.rs index 00439029..98cd02a3 100644 --- a/tests/coordinator/src/tests/sign.rs +++ b/tests/coordinator/src/tests/sign.rs @@ -149,7 +149,30 @@ pub async fn sign( ); } - // TODO: Completed flow + // Send Completed + for i in participants.clone() { + let processor = &mut processors[i]; + processor + .send_message(messages::sign::ProcessorMessage::Completed { + key: id.key.clone(), + id: id.id, + tx: b"signed_tx".to_vec(), + }) + .await; + } + wait_for_tributary().await; + + // Make sure every processor gets Completed + for processor in processors { + assert_eq!( + processor.recv_message().await, + CoordinatorMessage::Sign(messages::sign::CoordinatorMessage::Completed { + key: id.key.clone(), + id: id.id, + tx: b"signed_tx".to_vec() + }) + ); + } } #[tokio::test]