Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
e2e: Fix false-positive in canonical ref update test
Adrian Duke committed 7 days ago
commit 30b84c5580511b9a6705e3cf42393bae07790fc1
parent e68bbe4beb2f939fab59e245e0ecceef38362191
1 file changed +11 -1
modified crates/radicle-node/src/tests/e2e.rs
@@ -1691,12 +1691,22 @@ fn test_fetch_emits_canonical_ref_update() {
        .unwrap();
    assert!(result.is_success());

+
    // Drain all the events including initial `CanonicalRefUpdated`
+
    // from fetch
+
    while bob_events.try_recv().is_ok() {}
+

    let default_branch: git::fmt::Qualified = {
        let repo = alice.storage.repository(rid).unwrap();
        let proj = repo.project().unwrap();
        git::fmt::lit::refs_heads(proj.default_branch()).into()
    };
-
    alice.commit_to(rid, &default_branch);
+

+
    let namespaced_branch = default_branch
+
        .with_namespace(alice.id.to_component())
+
        .to_ref_string();
+
    alice.commit_to(rid, &namespaced_branch);
+

+
    alice.handle.announce_refs_for(rid, [alice.id]).unwrap();

    bob_events
        .wait(