mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-15 15:50:38 +08:00
node: Test fetch comes from right place
Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
@@ -435,11 +435,16 @@ fn test_push_and_pull() {
|
||||
// Alice announces her refs.
|
||||
// We now expect Eve to fetch Alice's project from Alice.
|
||||
// Then we expect Bob to fetch Alice's project from Eve.
|
||||
// TODO: Check that Bob is fetching from Eve and not Alice, via an event.
|
||||
alice.command(protocol::Command::AnnounceRefsUpdate(proj_id.clone()));
|
||||
sim.run_while([&mut alice, &mut bob, &mut eve], |s| !s.is_settled());
|
||||
assert!(eve.storage().get(&proj_id).unwrap().is_some());
|
||||
assert!(bob.storage().get(&proj_id).unwrap().is_some());
|
||||
assert_matches!(
|
||||
sim.events(&bob.ip).next(),
|
||||
Some(protocol::Event::RefsFetched { from, .. })
|
||||
if from == eve.git_url(),
|
||||
"Bob fetched from Eve"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user