Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
node: test multiple offline inits
Fintan Halpenny committed 1 year ago
commit 29e681210b1e568770ed6fc4d5ee11e7d346b5c4
parent 723e2741f54605c6404d0ff7f96cd6c14633cfb0
1 file changed +28 -0
modified radicle-node/src/tests/e2e.rs
@@ -1335,3 +1335,31 @@ fn test_catchup_on_refs_announcements() {
    alice.connect(&seed);
    alice.has_remote_of(&acme, &bob_id);
}
+

+
#[test]
+
fn test_multiple_offline_inits() {
+
    logger::init(log::Level::Debug);
+

+
    let tmp = tempfile::tempdir().unwrap();
+

+
    let mut alice = Node::init(tmp.path(), config::relay("alice"));
+
    let bob = Node::init(tmp.path(), config::relay("bob"));
+

+
    let acme = alice.project("acme", "");
+
    let radcliffe = alice.project("radcliffe", "");
+
    let cobs = alice.project("cobs", "");
+
    let projects = [acme, radcliffe, cobs];
+

+
    let mut alice = alice.spawn();
+
    let mut bob = bob.spawn();
+

+
    for rid in &projects {
+
        bob.handle.seed(*rid, Scope::All).unwrap();
+
    }
+

+
    alice.connect(&bob).converge([&bob]);
+

+
    for repo in bob.storage.repositories().unwrap() {
+
        assert!(projects.contains(&repo.rid), "Bob is missing {}", repo.rid);
+
    }
+
}