Skip to content

Commit

Permalink
test: Handle get providers event
Browse files Browse the repository at this point in the history
  • Loading branch information
bgins committed Jan 8, 2024
1 parent 42319c0 commit 775c3ef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions homestar-runtime/src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ mod test {

// first time check DHT for workflow info
let workflow_info_event = rx.recv_async().await.unwrap();
let get_workflow_providers_event = rx.recv_async().await.unwrap();

// we should have received 2 receipts
let next_run_receipt = rx.recv_async().await.unwrap();
Expand All @@ -574,6 +575,11 @@ mod test {
_ => panic!("Wrong event type"),
};

match get_workflow_providers_event {
Event::GetProviders(QueryRecord { cid, .. }) => assert_eq!(cid, worker_workflow_cid),
_ => panic!("Wrong event type"),
}

let (next_receipt, _wf_info) = match next_run_receipt {
Event::CapturedReceipt(Captured {
receipt: next_receipt,
Expand Down

0 comments on commit 775c3ef

Please sign in to comment.