rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 heartwood9462f09dd7fcab9c0393ea345f8587243339737f
{
"request": "trigger",
"version": 1,
"event_type": "patch",
"repository": {
"id": "rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5",
"name": "heartwood",
"description": "Radicle Heartwood Protocol & Stack",
"private": false,
"default_branch": "master",
"delegates": [
"did:key:z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT",
"did:key:z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM",
"did:key:z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz"
]
},
"action": "Created",
"patch": {
"id": "d793d03be363de5e8ffb6945d40c18831ca9bdfa",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"title": "cli: Refactor commands.rs into sub modules",
"state": {
"status": "merged",
"conflicts": []
},
"before": "e9245b630d728672d2b3d6ff9265fa4f1a86f13a",
"after": "9462f09dd7fcab9c0393ea345f8587243339737f",
"commits": [
"9462f09dd7fcab9c0393ea345f8587243339737f",
"cf047f66525e14cafd72d4543be9aa6e0b05a707",
"358eb109dd8274ddbdb98cd34afb3f2edd9c3935",
"9fd16c819928bf0ea0176163c6dbece1aebd1d6a",
"6f65edb698072fc58ce82c1b37e6bcbcf2fa40ba",
"8a07db71fecc0466ee55f110f4499ffd75faa184",
"d86a23d825b30ad74d513842af823d8b1ff2be71",
"704270e31086ac7376e321bf6275ee0767ca70b5",
"34c528e1ff45decb2b23d01f61c0c9c316bb94af",
"ab9231c51879f090a3b1a02f554a07aaf388d4f3",
"6a4e57f7a918a52b5eea5746112d6b1efac30d5f",
"3f46ead076b04d43c673f1bf6ad6ca292cf0a828",
"0022fc06198baed1b8692fac20851f1ee67ed7ee",
"6cf266978e9fdf4277de9c5329ab6f35cdfee7db",
"80e33ea70466c6084514fd6479e6786f9c6b0ca8",
"5df70c45b7b84d34ca0f053b6572a00768559aba",
"6fb97593474551c0377cd7807a52f9999ee55cdf"
],
"target": "7e1cb406bb935c3de008d2171e8961f57b4336ea",
"labels": [],
"assignees": [],
"revisions": [
{
"id": "d793d03be363de5e8ffb6945d40c18831ca9bdfa",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "The huge file was a sight for sore eyes, so refactored into sub modules.\n\nThe grouping may not be perfect, but its working towards more structure across the tests.\nIdeally we'd also restructure the markdown files too, but thats left for another patch.",
"base": "e9245b630d728672d2b3d6ff9265fa4f1a86f13a",
"oid": "568b2291b6276f70ae5712540ad09f442ac74ebd",
"timestamp": 1772639182
},
{
"id": "9c508e492c8a12bf8989fc1016893518a1e42973",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "Changes:\n- Re-organised into separate commits\n- Introduced modules: checkout, remote, sync, utility, workflow\n- Removed modules: misc\n- Renamed module: seed -> policy",
"base": "e9245b630d728672d2b3d6ff9265fa4f1a86f13a",
"oid": "8cbbe280108440e1949979e77d175f46bfcdbd1b",
"timestamp": 1773076534
},
{
"id": "69c208c2fbbb511eeeb2202dfd7266658ce4dd20",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "",
"base": "e9245b630d728672d2b3d6ff9265fa4f1a86f13a",
"oid": "9462f09dd7fcab9c0393ea345f8587243339737f",
"timestamp": 1773078088
},
{
"id": "97415b925f69c7ae44d840682273ee578d8ab39d",
"author": {
"id": "did:key:z6MkwGoyYxt6A2VE3fvZyH2rgiWdsXHBeV7jm7GSByS2aagA",
"alias": "ade"
},
"description": "Rebase",
"base": "5aaf978f972054dd81777d26b47f967eb9d6f00f",
"oid": "1b986af0060a10412df0c70705377c17622f5756",
"timestamp": 1773226595
}
]
}
}
{
"response": "triggered",
"run_id": {
"id": "5e32c98e-8955-4a77-b777-3b4fcca64a04"
},
"info_url": "https://cci.rad.levitte.org//5e32c98e-8955-4a77-b777-3b4fcca64a04.html"
}
Started at: 2026-09-09 05:13:12.420888+02:00
Commands:
$ rad clone rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5 .
✓ Creating checkout in ./...
✓ Remote cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT added
✓ Remote-tracking branch cloudhead@z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/master created for z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT
✓ Remote fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM added
✓ Remote-tracking branch fintohaps@z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM/master created for z6MkireRatUThvd3qzfKht1S44wpm4FEWSSa4PRMTSQZ3voM
✓ Remote lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz added
✓ Remote-tracking branch lorenz@z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz/master created for z6MkkPvBfjP4bQmco5Dm7UGsX2ruDBieEHi8n9DVJWX5sTEz
✓ Repository successfully cloned under /opt/radcis/ci.rad.levitte.org/cci/state/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/
╭────────────────────────────────────╮
│ heartwood │
│ Radicle Heartwood Protocol & Stack │
│ 189 issues · 39 patches │
╰────────────────────────────────────╯
Run `cd ./.` to go to the repository directory.
Exit code: 0
$ rad patch checkout d793d03be363de5e8ffb6945d40c18831ca9bdfa
✓ Switched to branch patch/d793d03 at revision 69c208c
✓ Branch patch/d793d03 setup to track rad/patches/d793d03be363de5e8ffb6945d40c18831ca9bdfa
Exit code: 0
$ git config advice.detachedHead false
Exit code: 0
$ git checkout 9462f09dd7fcab9c0393ea345f8587243339737f
HEAD is now at 9462f09d cli/tests: Refactor workflow test
Exit code: 0
$ rad patch show d793d03be363de5e8ffb6945d40c18831ca9bdfa -p
╭──────────────────────────────────────────────────────────────────────────────────╮
│ Title cli: Refactor commands.rs into sub modules │
│ Patch d793d03be363de5e8ffb6945d40c18831ca9bdfa │
│ Author ade z6MkwGo…yS2aagA │
│ Head 9462f09dd7fcab9c0393ea345f8587243339737f │
│ Base e9245b630d728672d2b3d6ff9265fa4f1a86f13a │
│ Target master │
│ Branches patch/d793d03 │
│ Commits ahead 17, behind 487 │
│ Status merged │
│ │
│ The huge file was a sight for sore eyes, so refactored into sub modules. │
│ │
│ The grouping may not be perfect, but its working towards more structure across │
│ the tests. │
│ Ideally we'd also restructure the markdown files too, but thats left for another │
│ patch. │
├──────────────────────────────────────────────────────────────────────────────────┤
│ 9462f09 cli/tests: Refactor workflow test │
│ cf047f6 cli/tests: Refactor watch command tests │
│ 358eb10 cli/tests: Refactor utility command tests │
│ 9fd16c8 cli/tests: Refactor sync command tests │
│ 6f65edb cli/tests: Refactor remote command tests │
│ 8a07db7 cli/tests: Refactor policy command tests │
│ d86a23d cli/tests: Refactor patch command tests │
│ 704270e cli/tests: Refactor node command tests │
│ 34c528e cli/tests: Refactor jj command tests │
│ ab9231c cli/tests: Refactor issue command tests │
│ 6a4e57f cli/tests: Refactor init command tests │
│ 3f46ead cli/tests: Refactor inbox command tests │
│ 0022fc0 cli/tests: Refactor id command tests │
│ 6cf2669 cli/tests: Refactor git command tests │
│ 80e33ea cli/tests: Refactor cob command tests │
│ 5df70c4 cli/tests: Refactor clone command tests │
│ 6fb9759 cli/tests: Refactor checkout command tests │
├──────────────────────────────────────────────────────────────────────────────────┤
│ ● Revision d793d03 @ e9245b6..568b229 by ade z6MkwGo…yS2aagA 6 months ago │
│ ↑ Revision 9c508e4 @ e9245b6..8cbbe28 by fintohaps z6Mkire…SQZ3voM 6 months ago │
│ ↑ Revision 69c208c @ e9245b6..9462f09 by ade z6MkwGo…yS2aagA 6 months ago │
│ ↑ Revision 97415b9 @ 5aaf978..1b986af by fintohaps z6Mkire…SQZ3voM 5 months ago │
│ └─ ✓ merged by fintohaps z6Mkire…SQZ3voM │
╰──────────────────────────────────────────────────────────────────────────────────╯
commit 9462f09dd7fcab9c0393ea345f8587243339737f
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Mon Mar 9 16:43:37 2026 +0000
cli/tests: Refactor workflow test
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 0709967dc0..602aa2f8c0 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -30,6 +30,7 @@ mod commands {
mod sync;
mod utility;
mod watch;
+ mod workflow;
}
/// Run a CLI test file.
@@ -138,53 +139,3 @@ fn rad_remote() {
)
.unwrap();
}
-
-#[test]
-fn rad_workflow() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- environment.test("workflow/1-new-project", &alice).unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
-
- environment.test("workflow/2-cloning", &bob).unwrap();
-
- test(
- "examples/workflow/3-issues.md",
- environment.work(&bob).join("heartwood"),
- Some(&bob.home),
- [],
- )
- .unwrap();
-
- test(
- "examples/workflow/4-patching-contributor.md",
- environment.work(&bob).join("heartwood"),
- Some(&bob.home),
- [],
- )
- .unwrap();
-
- test(
- "examples/workflow/5-patching-maintainer.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- test(
- "examples/workflow/6-pulling-contributor.md",
- environment.work(&bob).join("heartwood"),
- Some(&bob.home),
- [],
- )
- .unwrap();
-}
diff --git a/crates/radicle-cli/tests/commands/workflow.rs b/crates/radicle-cli/tests/commands/workflow.rs
new file mode 100644
index 0000000000..8b26100636
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/workflow.rs
@@ -0,0 +1,52 @@
+use crate::test;
+use crate::util::environment::Environment;
+
+#[test]
+fn rad_workflow() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ environment.test("workflow/1-new-project", &alice).unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+
+ environment.test("workflow/2-cloning", &bob).unwrap();
+
+ test(
+ "examples/workflow/3-issues.md",
+ environment.work(&bob).join("heartwood"),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+
+ test(
+ "examples/workflow/4-patching-contributor.md",
+ environment.work(&bob).join("heartwood"),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+
+ test(
+ "examples/workflow/5-patching-maintainer.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ test(
+ "examples/workflow/6-pulling-contributor.md",
+ environment.work(&bob).join("heartwood"),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+}
commit cf047f66525e14cafd72d4543be9aa6e0b05a707
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor watch command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index b977dc7793..0709967dc0 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -29,6 +29,7 @@ mod commands {
mod remote;
mod sync;
mod utility;
+ mod watch;
}
/// Run a CLI test file.
@@ -138,36 +139,6 @@ fn rad_remote() {
.unwrap();
}
-#[test]
-fn rad_watch() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let (repo, _) = environment.repository(&alice);
- let rid = alice.project_from("heartwood", "Radicle Heartwood Protocol & Stack", &repo);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.clone(rid, environment.work(&bob)).unwrap();
-
- formula(&environment.tempdir(), "examples/rad-watch.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_workflow() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/watch.rs b/crates/radicle-cli/tests/commands/watch.rs
new file mode 100644
index 0000000000..26c08ad03f
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/watch.rs
@@ -0,0 +1,32 @@
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+
+#[test]
+fn rad_watch() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let (repo, _) = environment.repository(&alice);
+ let rid = alice.project_from("heartwood", "Radicle Heartwood Protocol & Stack", &repo);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.clone(rid, environment.work(&bob)).unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-watch.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
commit 358eb109dd8274ddbdb98cd34afb3f2edd9c3935
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Mon Mar 9 16:20:19 2026 +0000
cli/tests: Refactor utility command tests
Place utility command tests in their own module.
These commands relate to inspection of state, such as: `rad self`,
`rad config`, `rad inspect`, etc.
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 5aca63172c..b977dc7793 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -1,15 +1,10 @@
use core::panic;
-use std::fs;
use std::path::Path;
use std::str::FromStr;
-use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
-use radicle::node::policy::Scope;
-use radicle::node::{Alias, Config, Handle as _, DEFAULT_TIMEOUT};
+use radicle::node::{Alias, Handle as _};
use radicle::prelude::RepoId;
-use radicle::profile;
use radicle::profile::Home;
-use radicle::test::fixtures;
#[allow(unused_imports)]
use radicle_node::test::logger;
@@ -33,6 +28,7 @@ mod commands {
mod policy;
mod remote;
mod sync;
+ mod utility;
}
/// Run a CLI test file.
@@ -93,94 +89,20 @@ fn program_reports_version(program: &str) -> bool {
}
#[test]
-fn rad_help() {
- Environment::alice(["rad-help"]);
-}
-
-#[test]
-fn rad_auth() {
- test("examples/rad-auth.md", Path::new("."), None, []).unwrap();
-}
-
-#[test]
-fn rad_key_mismatch() {
+fn rad_remote() {
let mut environment = Environment::new();
- let alice = environment.profile("alice");
+ let alice = environment.relay("alice");
+ let bob = environment.relay("bob");
+ let eve = environment.relay("eve");
+ let home = alice.home.clone();
+ let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+ // Setup a test repository.
environment.repository(&alice);
- environment.test("rad-init", &alice).unwrap();
-
- // Replace the public key with one that does not match the secret key anymore.
- fs::write(alice.home.path().join("keys").join("radicle.pub"), "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6Ul/D+P0I/Hl1JVOWGS8Z589us9FqKQXWv8OMOpKCh snakeoil\n").unwrap();
-
- environment.test("rad-key-mismatch", &alice).unwrap();
-}
-
-#[test]
-fn rad_auth_errors() {
- test("examples/rad-auth-errors.md", Path::new("."), None, []).unwrap();
-}
-
-#[test]
-fn rad_inspect() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
-
- environment.repository(&profile);
-
- environment
- .tests(["rad-init", "rad-inspect"], &profile)
- .unwrap();
-
- // NOTE: The next test runs without $RAD_HOME set.
- test(
- "examples/rad-inspect-noauth.md",
- environment.work(&profile),
- None,
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_config() {
- let mut environment = Environment::new();
- let alias = Alias::new("alice");
- let profile = environment.profile_with(profile::Config {
- preferred_seeds: vec![RADICLE_NODE_BOOTSTRAP_IRIS.clone().first().unwrap().clone()],
- ..profile::Config::new(alias)
- });
- let working = tempfile::tempdir().unwrap();
-
- test(
- "examples/rad-config.md",
- working.path(),
- Some(&profile.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_warn_old_nodes() {
- Environment::alice(["rad-warn-old-nodes"]);
-}
-
-#[test]
-fn rad_clean() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let eve = environment.node("eve");
- let working = environment.tempdir().join("working");
-
- // Setup a test project.
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
- fixtures::repository(working.join("acme"));
test(
"examples/rad-init.md",
- working.join("acme"),
- Some(&alice.home),
+ environment.work(&alice),
+ Some(&home),
[],
)
.unwrap();
@@ -188,90 +110,32 @@ fn rad_clean() {
let mut alice = alice.spawn();
let mut bob = bob.spawn();
let mut eve = eve.spawn();
- alice.handle.seed(acme, Scope::All).unwrap();
- eve.handle.seed(acme, Scope::Followed).unwrap();
-
- bob.connect(&alice).converge([&alice]);
- eve.connect(&alice).converge([&alice]);
-
- eve.handle.fetch(acme, alice.id, DEFAULT_TIMEOUT).unwrap();
-
- bob.fork(acme, bob.home.path()).unwrap();
- bob.announce(acme, 1, bob.home.path()).unwrap();
- bob.has_remote_of(&acme, &alice.id);
- alice.has_remote_of(&acme, &bob.id);
- eve.has_remote_of(&acme, &alice.id);
-
- formula(&environment.tempdir(), "examples/rad-clean.md")
- .unwrap()
- .home(
- "alice",
- working.join("acme"),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- working.join("bob"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .home(
- "eve",
- working.join("eve"),
- [("RAD_HOME", eve.home.path().display())],
- )
- .run()
+ alice
+ .handle
+ .follow(bob.id, Some(Alias::new("bob")))
+ .unwrap();
+ alice
+ .handle
+ .follow(eve.id, Some(Alias::new("eve")))
.unwrap();
-}
-
-#[test]
-fn rad_self() {
- let mut environment = Environment::new();
- let alice = environment.node_with(Config {
- external_addresses: vec!["seed.alice.acme:8776".parse().unwrap()],
- ..Config::test(Alias::new("alice"))
- });
- let working = environment.tempdir().join("working");
-
- test("examples/rad-self.md", working, Some(&alice.home), []).unwrap();
-}
-
-#[cfg(unix)]
-#[test]
-fn rad_diff() {
- if std::env::consts::OS == "macos" {
- // macOS's `sed` requires an argument for `-i`, which we don't provide
- // in the example. Providing it makes the test fail on Linux.
- // Since this command is deprecated anyway, we just skip macOS.
- return;
- }
-
- let tmp = tempfile::tempdir().unwrap();
-
- fixtures::repository(&tmp);
- test("examples/rad-diff.md", tmp, None, []).unwrap();
-}
+ bob.connect(&alice);
+ bob.routes_to(&[(rid, alice.id)]);
+ bob.fork(rid, bob.home.path()).unwrap();
+ alice.has_remote_of(&rid, &bob.id);
-#[test]
-fn framework_home() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
+ eve.connect(&alice);
+ eve.routes_to(&[(rid, alice.id)]);
+ eve.fork(rid, eve.home.path()).unwrap();
+ alice.has_remote_of(&rid, &eve.id);
- formula(&environment.tempdir(), "examples/framework/home.md")
- .unwrap()
- .home(
- "alice",
- alice.home.path(),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- bob.home.path(),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
+ test(
+ "examples/rad-remote.md",
+ environment.work(&alice),
+ Some(&home),
+ [],
+ )
+ .unwrap();
}
#[test]
diff --git a/crates/radicle-cli/tests/commands/utility.rs b/crates/radicle-cli/tests/commands/utility.rs
new file mode 100644
index 0000000000..66040c3f8d
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/utility.rs
@@ -0,0 +1,226 @@
+use std::str::FromStr as _;
+
+use radicle::node::policy::Scope;
+use radicle::node::DEFAULT_TIMEOUT;
+use radicle::node::{Alias, Handle as _};
+use radicle::prelude::RepoId;
+use radicle::profile;
+
+use crate::test;
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+
+#[test]
+fn rad_inspect() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+
+ environment.repository(&profile);
+
+ environment
+ .tests(["rad-init", "rad-inspect"], &profile)
+ .unwrap();
+
+ // NOTE: The next test runs without $RAD_HOME set.
+ test(
+ "examples/rad-inspect-noauth.md",
+ environment.work(&profile),
+ None,
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_config() {
+ let mut environment = Environment::new();
+ let alias = Alias::new("alice");
+ let profile = environment.profile_with(profile::Config {
+ preferred_seeds: vec![radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS
+ .clone()
+ .first()
+ .unwrap()
+ .clone()],
+ ..profile::Config::new(alias)
+ });
+ let working = tempfile::tempdir().unwrap();
+
+ test(
+ "examples/rad-config.md",
+ working.path(),
+ Some(&profile.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_warn_old_nodes() {
+ Environment::alice(["rad-warn-old-nodes"]);
+}
+
+#[test]
+fn rad_clean() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let eve = environment.node("eve");
+ let working = environment.tempdir().join("working");
+
+ // Setup a test project.
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+ radicle::test::fixtures::repository(working.join("acme"));
+ test(
+ "examples/rad-init.md",
+ working.join("acme"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+ alice.handle.seed(acme, Scope::All).unwrap();
+ eve.handle.seed(acme, Scope::Followed).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+ eve.connect(&alice).converge([&alice]);
+
+ eve.handle.fetch(acme, alice.id, DEFAULT_TIMEOUT).unwrap();
+
+ bob.fork(acme, bob.home.path()).unwrap();
+ bob.announce(acme, 1, bob.home.path()).unwrap();
+ bob.has_remote_of(&acme, &alice.id);
+ alice.has_remote_of(&acme, &bob.id);
+ eve.has_remote_of(&acme, &alice.id);
+
+ formula(&environment.tempdir(), "examples/rad-clean.md")
+ .unwrap()
+ .home(
+ "alice",
+ working.join("acme"),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ working.join("bob"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .home(
+ "eve",
+ working.join("eve"),
+ [("RAD_HOME", eve.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_self() {
+ let mut environment = Environment::new();
+ let alice = environment.node_with(radicle::node::Config {
+ external_addresses: vec!["seed.alice.acme:8776".parse().unwrap()],
+ ..radicle::node::Config::test(Alias::new("alice"))
+ });
+ let working = environment.tempdir().join("working");
+
+ test("examples/rad-self.md", working, Some(&alice.home), []).unwrap();
+}
+
+#[test]
+fn rad_help() {
+ Environment::alice(["rad-help"]);
+}
+
+#[test]
+fn rad_auth() {
+ test("examples/rad-auth.md", std::path::Path::new("."), None, []).unwrap();
+}
+
+#[test]
+fn rad_key_mismatch() {
+ let mut environment = Environment::new();
+ let alice = environment.profile("alice");
+ environment.repository(&alice);
+
+ environment.test("rad-init", &alice).unwrap();
+
+ // Replace the public key with one that does not match the secret key anymore.
+ std::fs::write(alice.home.path().join("keys").join("radicle.pub"), "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIE6Ul/D+P0I/Hl1JVOWGS8Z589us9FqKQXWv8OMOpKCh snakeoil\n").unwrap();
+
+ environment.test("rad-key-mismatch", &alice).unwrap();
+}
+
+#[test]
+fn rad_auth_errors() {
+ test(
+ "examples/rad-auth-errors.md",
+ std::path::Path::new("."),
+ None,
+ [],
+ )
+ .unwrap();
+}
+
+#[cfg(unix)]
+#[test]
+fn rad_diff() {
+ use radicle::test::fixtures;
+
+ if std::env::consts::OS == "macos" {
+ // macOS's `sed` requires an argument for `-i`, which we don't provide
+ // in the example. Providing it makes the test fail on Linux.
+ // Since this command is deprecated anyway, we just skip macOS.
+ return;
+ }
+
+ let tmp = tempfile::tempdir().unwrap();
+
+ fixtures::repository(&tmp);
+
+ test("examples/rad-diff.md", tmp, None, []).unwrap();
+}
+
+#[test]
+fn rad_fork() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let mut alice = alice.spawn();
+ let bob = bob.spawn();
+
+ alice.connect(&bob);
+ environment.repository(&alice);
+
+ // Alice initializes a repo after her node has started, and after bob has connected to it.
+ environment.test("rad-init-sync", &alice).unwrap();
+
+ // Wait for bob to get any updates to the routing table.
+ bob.converge([&alice]);
+
+ environment.tests(["rad-fetch", "rad-fork"], &bob).unwrap();
+}
+
+#[test]
+fn framework_home() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ formula(&environment.tempdir(), "examples/framework/home.md")
+ .unwrap()
+ .home(
+ "alice",
+ alice.home.path(),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ bob.home.path(),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
commit 9fd16c819928bf0ea0176163c6dbece1aebd1d6a
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Mon Mar 9 15:56:36 2026 +0000
cli/tests: Refactor sync command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index c70aa0eb31..5aca63172c 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -1,24 +1,21 @@
use core::panic;
+use std::fs;
use std::path::Path;
use std::str::FromStr;
-use std::{fs, thread, time};
use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
-use radicle::node::config::DefaultSeedingPolicy;
-use radicle::node::events::Event;
use radicle::node::policy::Scope;
use radicle::node::{Alias, Config, Handle as _, DEFAULT_TIMEOUT};
use radicle::prelude::RepoId;
use radicle::profile;
use radicle::profile::Home;
-use radicle::storage::{ReadStorage, RemoteRepository};
use radicle::test::fixtures;
#[allow(unused_imports)]
use radicle_node::test::logger;
mod util;
-use util::environment::{config, Environment};
+use util::environment::Environment;
use util::formula::formula;
mod commands {
@@ -35,6 +32,7 @@ mod commands {
mod patch;
mod policy;
mod remote;
+ mod sync;
}
/// Run a CLI test file.
@@ -225,37 +223,6 @@ fn rad_clean() {
.unwrap();
}
-#[test]
-fn rad_sync_without_node() {
- let mut environment = Environment::new();
- let alice = environment.seed("alice");
- let bob = environment.seed("bob");
- let mut eve = environment.seed("eve");
-
- let rid = RepoId::from_urn("rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5").unwrap();
- eve.policies.seed(&rid, Scope::All).unwrap();
-
- formula(&environment.tempdir(), "examples/rad-sync-without-node.md")
- .unwrap()
- .home(
- "alice",
- alice.home.path(),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- bob.home.path(),
- [("RAD_HOME", bob.home.path().display())],
- )
- .home(
- "eve",
- eve.home.path(),
- [("RAD_HOME", eve.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_self() {
let mut environment = Environment::new();
@@ -268,27 +235,6 @@ fn rad_self() {
test("examples/rad-self.md", working, Some(&alice.home), []).unwrap();
}
-#[test]
-fn rad_fetch() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let mut alice = alice.spawn();
- let bob = bob.spawn();
-
- alice.connect(&bob);
- environment.repository(&alice);
-
- // Alice initializes a repo after her node has started, and after bob has connected to it.
- environment.test("rad-init-sync", &alice).unwrap();
-
- // Wait for bob to get any updates to the routing table.
- bob.converge([&alice]);
-
- environment.test("rad-fetch", &bob).unwrap();
-}
-
#[cfg(unix)]
#[test]
fn rad_diff() {
@@ -306,141 +252,6 @@ fn rad_diff() {
test("examples/rad-diff.md", tmp, None, []).unwrap();
}
-#[test]
-fn rad_sync() {
- let mut environment = Environment::new();
- let working = environment.tempdir().join("working");
- let alice = environment.seed("alice");
- let bob = environment.seed("bob");
- let eve = environment.seed("eve");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- fixtures::repository(working.join("acme"));
-
- test(
- "examples/rad-init.md",
- working.join("acme"),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut eve = eve.spawn();
-
- bob.handle.seed(acme, Scope::All).unwrap();
- eve.handle.seed(acme, Scope::All).unwrap();
-
- alice.connect(&bob);
- eve.connect(&alice);
-
- bob.routes_to(&[(acme, alice.id)]);
- eve.routes_to(&[(acme, alice.id)]);
- alice.routes_to(&[(acme, alice.id), (acme, eve.id), (acme, bob.id)]);
- alice.is_synced_with(&acme, &eve.id);
- alice.is_synced_with(&acme, &bob.id);
-
- test(
- "examples/rad-sync.md",
- working.join("acme"),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-//
-// alice -- seed -- bob
-//
-fn test_replication_via_seed() {
- let mut environment = Environment::new();
- let alice = environment.relay("alice");
- let bob = environment.relay("bob");
- let seed = environment.node_with(Config {
- seeding_policy: DefaultSeedingPolicy::permissive(),
- ..config::relay("seed")
- });
- let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let seed = seed.spawn();
-
- alice.connect(&seed);
- bob.connect(&seed);
-
- // Enough time for the next inventory from Seed to not be considered stale by Bob.
- thread::sleep(time::Duration::from_millis(3));
-
- alice.routes_to(&[]);
- seed.routes_to(&[]);
- bob.routes_to(&[]);
-
- // Initialize a repo as Alice.
- environment.repository(&alice);
- alice
- .rad(
- "init",
- &[
- "--name",
- "heartwood",
- "--description",
- "Radicle Heartwood Protocol & Stack",
- "--default-branch",
- "master",
- "--public",
- ],
- environment.work(&alice),
- )
- .unwrap();
-
- alice
- .rad("follow", &[&bob.id.to_human()], environment.work(&alice))
- .unwrap();
-
- alice.routes_to(&[(rid, alice.id), (rid, seed.id)]);
- seed.routes_to(&[(rid, alice.id), (rid, seed.id)]);
- bob.routes_to(&[(rid, alice.id), (rid, seed.id)]);
-
- let seed_events = seed.handle.events();
- let alice_events = alice.handle.events();
-
- bob.fork(rid, environment.work(&bob)).unwrap();
-
- alice.routes_to(&[(rid, alice.id), (rid, seed.id), (rid, bob.id)]);
- seed.routes_to(&[(rid, alice.id), (rid, seed.id), (rid, bob.id)]);
- bob.routes_to(&[(rid, alice.id), (rid, seed.id), (rid, bob.id)]);
-
- seed_events.iter().any(|e| {
- matches!(
- e, Event::RefsFetched { updated, remote, .. }
- if remote == bob.id && updated.iter().any(|u| u.is_created())
- )
- });
- alice_events.iter().any(|e| {
- matches!(
- e, Event::RefsFetched { updated, remote, .. }
- if remote == seed.id && updated.iter().any(|u| u.is_created())
- )
- });
-
- seed.storage
- .repository(rid)
- .unwrap()
- .remote(&bob.id)
- .unwrap();
-
- // Seed should send Bob's ref announcement to Alice, after the fetch.
- alice
- .storage
- .repository(rid)
- .unwrap()
- .remote(&bob.id)
- .unwrap();
-}
-
#[test]
fn framework_home() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/sync.rs b/crates/radicle-cli/tests/commands/sync.rs
new file mode 100644
index 0000000000..48e6379d91
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/sync.rs
@@ -0,0 +1,197 @@
+use std::str::FromStr as _;
+
+use radicle::node::config::DefaultSeedingPolicy;
+use radicle::node::policy::Scope;
+use radicle::node::Handle as _;
+use radicle::prelude::RepoId;
+use radicle::storage::{ReadStorage as _, RemoteRepository as _};
+
+use crate::test;
+use crate::util::{environment::Environment, formula::formula};
+
+#[test]
+fn rad_sync_without_node() {
+ let mut environment = Environment::new();
+ let alice = environment.seed("alice");
+ let bob = environment.seed("bob");
+ let mut eve = environment.seed("eve");
+
+ let rid = RepoId::from_urn("rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5").unwrap();
+ eve.policies.seed(&rid, Scope::All).unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-sync-without-node.md")
+ .unwrap()
+ .home(
+ "alice",
+ alice.home.path(),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ bob.home.path(),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .home(
+ "eve",
+ eve.home.path(),
+ [("RAD_HOME", eve.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_fetch() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let mut alice = alice.spawn();
+ let bob = bob.spawn();
+
+ alice.connect(&bob);
+ environment.repository(&alice);
+
+ // Alice initializes a repo after her node has started, and after bob has connected to it.
+ environment.test("rad-init-sync", &alice).unwrap();
+
+ // Wait for bob to get any updates to the routing table.
+ bob.converge([&alice]);
+
+ environment.test("rad-fetch", &bob).unwrap();
+}
+
+#[test]
+fn rad_sync() {
+ let mut environment = Environment::new();
+ let working = environment.tempdir().join("working");
+ let alice = environment.seed("alice");
+ let bob = environment.seed("bob");
+ let eve = environment.seed("eve");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ radicle::test::fixtures::repository(working.join("acme"));
+
+ test(
+ "examples/rad-init.md",
+ working.join("acme"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+
+ bob.handle.seed(acme, Scope::All).unwrap();
+ eve.handle.seed(acme, Scope::All).unwrap();
+
+ alice.connect(&bob);
+ eve.connect(&alice);
+
+ bob.routes_to(&[(acme, alice.id)]);
+ eve.routes_to(&[(acme, alice.id)]);
+ alice.routes_to(&[(acme, alice.id), (acme, eve.id), (acme, bob.id)]);
+ alice.is_synced_with(&acme, &eve.id);
+ alice.is_synced_with(&acme, &bob.id);
+
+ test(
+ "examples/rad-sync.md",
+ working.join("acme"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+//
+// alice -- seed -- bob
+//
+fn test_replication_via_seed() {
+ let mut environment = Environment::new();
+ let alice = environment.relay("alice");
+ let bob = environment.relay("bob");
+ let seed = environment.node_with(radicle::node::Config {
+ seeding_policy: DefaultSeedingPolicy::permissive(),
+ ..crate::util::environment::config::relay("seed")
+ });
+ let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let seed = seed.spawn();
+
+ alice.connect(&seed);
+ bob.connect(&seed);
+
+ // Enough time for the next inventory from Seed to not be considered stale by Bob.
+ std::thread::sleep(std::time::Duration::from_millis(3));
+
+ alice.routes_to(&[]);
+ seed.routes_to(&[]);
+ bob.routes_to(&[]);
+
+ // Initialize a repo as Alice.
+ environment.repository(&alice);
+ alice
+ .rad(
+ "init",
+ &[
+ "--name",
+ "heartwood",
+ "--description",
+ "Radicle Heartwood Protocol & Stack",
+ "--default-branch",
+ "master",
+ "--public",
+ ],
+ environment.work(&alice),
+ )
+ .unwrap();
+
+ alice
+ .rad("follow", &[&bob.id.to_human()], environment.work(&alice))
+ .unwrap();
+
+ alice.routes_to(&[(rid, alice.id), (rid, seed.id)]);
+ seed.routes_to(&[(rid, alice.id), (rid, seed.id)]);
+ bob.routes_to(&[(rid, alice.id), (rid, seed.id)]);
+
+ let seed_events = seed.handle.events();
+ let alice_events = alice.handle.events();
+
+ bob.fork(rid, environment.work(&bob)).unwrap();
+
+ alice.routes_to(&[(rid, alice.id), (rid, seed.id), (rid, bob.id)]);
+ seed.routes_to(&[(rid, alice.id), (rid, seed.id), (rid, bob.id)]);
+ bob.routes_to(&[(rid, alice.id), (rid, seed.id), (rid, bob.id)]);
+
+ seed_events.iter().any(|e| {
+ matches!(
+ e, radicle::node::Event::RefsFetched { updated, remote, .. }
+ if remote == bob.id && updated.iter().any(|u| u.is_created())
+ )
+ });
+ alice_events.iter().any(|e| {
+ matches!(
+ e, radicle::node::Event::RefsFetched { updated, remote, .. }
+ if remote == seed.id && updated.iter().any(|u| u.is_created())
+ )
+ });
+
+ seed.storage
+ .repository(rid)
+ .unwrap()
+ .remote(&bob.id)
+ .unwrap();
+
+ // Seed should send Bob's ref announcement to Alice, after the fetch.
+ alice
+ .storage
+ .repository(rid)
+ .unwrap()
+ .remote(&bob.id)
+ .unwrap();
+}
commit 6f65edb698072fc58ce82c1b37e6bcbcf2fa40ba
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor remote command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index a1b43c1064..c70aa0eb31 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -34,6 +34,7 @@ mod commands {
mod node;
mod patch;
mod policy;
+ mod remote;
}
/// Run a CLI test file.
@@ -440,56 +441,6 @@ fn test_replication_via_seed() {
.unwrap();
}
-#[test]
-fn rad_remote() {
- let mut environment = Environment::new();
- let alice = environment.relay("alice");
- let bob = environment.relay("bob");
- let eve = environment.relay("eve");
- let home = alice.home.clone();
- let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
- // Setup a test repository.
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut eve = eve.spawn();
- alice
- .handle
- .follow(bob.id, Some(Alias::new("bob")))
- .unwrap();
- alice
- .handle
- .follow(eve.id, Some(Alias::new("eve")))
- .unwrap();
-
- bob.connect(&alice);
- bob.routes_to(&[(rid, alice.id)]);
- bob.fork(rid, bob.home.path()).unwrap();
- alice.has_remote_of(&rid, &bob.id);
-
- eve.connect(&alice);
- eve.routes_to(&[(rid, alice.id)]);
- eve.fork(rid, eve.home.path()).unwrap();
- alice.has_remote_of(&rid, &eve.id);
-
- test(
- "examples/rad-remote.md",
- environment.work(&alice),
- Some(&home),
- [],
- )
- .unwrap();
-}
-
#[test]
fn framework_home() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/remote.rs b/crates/radicle-cli/tests/commands/remote.rs
new file mode 100644
index 0000000000..de68e0c6dc
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/remote.rs
@@ -0,0 +1,57 @@
+use std::str::FromStr as _;
+
+use radicle::node::{Alias, Handle as _};
+use radicle::prelude::RepoId;
+
+use crate::test;
+use crate::util::environment::Environment;
+
+#[test]
+fn rad_remote() {
+ let mut environment = Environment::new();
+ let alice = environment.relay("alice");
+ let bob = environment.relay("bob");
+ let eve = environment.relay("eve");
+ let home = alice.home.clone();
+ let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+ // Setup a test repository.
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+ alice
+ .handle
+ .follow(bob.id, Some(Alias::new("bob")))
+ .unwrap();
+ alice
+ .handle
+ .follow(eve.id, Some(Alias::new("eve")))
+ .unwrap();
+
+ bob.connect(&alice);
+ bob.routes_to(&[(rid, alice.id)]);
+ bob.fork(rid, bob.home.path()).unwrap();
+ alice.has_remote_of(&rid, &bob.id);
+
+ eve.connect(&alice);
+ eve.routes_to(&[(rid, alice.id)]);
+ eve.fork(rid, eve.home.path()).unwrap();
+ alice.has_remote_of(&rid, &eve.id);
+
+ test(
+ "examples/rad-remote.md",
+ environment.work(&alice),
+ Some(&home),
+ [],
+ )
+ .unwrap();
+}
commit 8a07db71fecc0466ee55f110f4499ffd75faa184
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor policy command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index eaafe63210..a1b43c1064 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -3,7 +3,6 @@ use std::path::Path;
use std::str::FromStr;
use std::{fs, thread, time};
-use radicle::node;
use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::events::Event;
@@ -34,6 +33,7 @@ mod commands {
mod jj;
mod node;
mod patch;
+ mod policy;
}
/// Run a CLI test file.
@@ -224,77 +224,6 @@ fn rad_clean() {
.unwrap();
}
-#[test]
-fn rad_seed_and_follow() {
- Environment::alice(["rad-seed-and-follow"]);
-}
-
-#[test]
-fn rad_seed_many() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let mut bob = environment.node("bob");
- // Bob creates two projects that Alice seeds in the test
- let _ = bob.project("heartwood", "Radicle Heartwood Protocol & Stack");
- let _ = bob.project("nixpkgs", "Home for Nix Packages");
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
-
- test(
- "examples/rad-seed-many.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_unseed() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let working = tempfile::tempdir().unwrap();
-
- // Setup a test project.
- alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
- let alice = alice.spawn();
-
- test("examples/rad-unseed.md", working, Some(&alice.home), []).unwrap();
-}
-
-#[test]
-fn rad_unseed_many() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
-
- // Setup a test project.
- alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
- alice.project("nixpkgs", "Home for Nix Packages");
- let alice = alice.spawn();
-
- test(
- "examples/rad-unseed-many.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_block() {
- let mut environment = Environment::new();
- let alice = environment.node_with(Config {
- seeding_policy: DefaultSeedingPolicy::permissive(),
- ..Config::test(Alias::new("alice"))
- });
- let working = tempfile::tempdir().unwrap();
-
- test("examples/rad-block.md", working, Some(&alice.home), []).unwrap();
-}
-
#[test]
fn rad_sync_without_node() {
let mut environment = Environment::new();
@@ -662,24 +591,3 @@ fn rad_workflow() {
)
.unwrap();
}
-
-#[test]
-fn rad_seed_policy_allow_no_scope() {
- let mut environment = Environment::new();
- let alice = environment.node_with(Config {
- seeding_policy: DefaultSeedingPolicy::Allow {
- scope: node::config::Scope::implicit(),
- },
- ..Config::test(Alias::new("alice"))
- });
-
- let alice = alice.spawn();
-
- test(
- "examples/rad-seed-policy-allow-no-scope.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
diff --git a/crates/radicle-cli/tests/commands/policy.rs b/crates/radicle-cli/tests/commands/policy.rs
new file mode 100644
index 0000000000..ecbdacaabd
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/policy.rs
@@ -0,0 +1,97 @@
+use crate::test;
+use crate::util::environment::Environment;
+use radicle::node;
+use radicle::node::config::DefaultSeedingPolicy;
+use radicle::node::Alias;
+
+#[test]
+fn rad_seed_and_follow() {
+ Environment::alice(["rad-seed-and-follow"]);
+}
+
+#[test]
+fn rad_seed_many() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let mut bob = environment.node("bob");
+ // Bob creates two projects that Alice seeds in the test
+ let _ = bob.project("heartwood", "Radicle Heartwood Protocol & Stack");
+ let _ = bob.project("nixpkgs", "Home for Nix Packages");
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+
+ test(
+ "examples/rad-seed-many.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_unseed() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let working = tempfile::tempdir().unwrap();
+
+ // Setup a test project.
+ alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+ let alice = alice.spawn();
+
+ test("examples/rad-unseed.md", working, Some(&alice.home), []).unwrap();
+}
+
+#[test]
+fn rad_unseed_many() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+
+ // Setup a test project.
+ alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+ alice.project("nixpkgs", "Home for Nix Packages");
+ let alice = alice.spawn();
+
+ test(
+ "examples/rad-unseed-many.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_block() {
+ let mut environment = Environment::new();
+ let alice = environment.node_with(radicle::node::Config {
+ seeding_policy: DefaultSeedingPolicy::permissive(),
+ ..radicle::node::Config::test(Alias::new("alice"))
+ });
+ let working = tempfile::tempdir().unwrap();
+
+ test("examples/rad-block.md", working, Some(&alice.home), []).unwrap();
+}
+
+#[test]
+fn rad_seed_policy_allow_no_scope() {
+ let mut environment = Environment::new();
+ let alice = environment.node_with(radicle::node::Config {
+ seeding_policy: DefaultSeedingPolicy::Allow {
+ scope: node::config::Scope::implicit(),
+ },
+ ..radicle::node::Config::test(Alias::new("alice"))
+ });
+
+ let alice = alice.spawn();
+
+ test(
+ "examples/rad-seed-policy-allow-no-scope.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
commit d86a23d825b30ad74d513842af823d8b1ff2be71
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor patch command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index d290cd2c2d..eaafe63210 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -17,7 +17,6 @@ use radicle::test::fixtures;
#[allow(unused_imports)]
use radicle_node::test::logger;
-use radicle_node::test::node::Node;
mod util;
use util::environment::{config, Environment};
@@ -34,6 +33,7 @@ mod commands {
mod issue;
mod jj;
mod node;
+ mod patch;
}
/// Run a CLI test file.
@@ -167,200 +167,6 @@ fn rad_warn_old_nodes() {
Environment::alice(["rad-warn-old-nodes"]);
}
-#[test]
-fn rad_patch() {
- Environment::alice(["rad-init", "rad-patch"]);
-}
-
-#[test]
-fn rad_patch_diff() {
- Environment::alice(["rad-init", "rad-patch-diff"]);
-}
-
-#[test]
-fn rad_patch_edit() {
- Environment::alice(["rad-init", "rad-patch-edit"]);
-}
-
-#[test]
-fn rad_patch_checkout() {
- Environment::alice(["rad-init", "rad-patch-checkout"]);
-}
-
-#[test]
-fn rad_patch_checkout_revision() {
- Environment::alice([
- "rad-init",
- "rad-patch-checkout",
- "rad-patch-checkout-revision",
- ]);
-}
-
-#[test]
-fn rad_patch_checkout_force() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.handle.seed(acme, Scope::All).unwrap();
- alice.connect(&bob).converge([&bob]);
-
- bob.rad(
- "clone",
- &[acme.to_string().as_str()],
- environment.work(&bob),
- )
- .unwrap();
-
- formula(
- &environment.tempdir(),
- "examples/rad-patch-checkout-force.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_patch_update() {
- Environment::alice(["rad-init", "rad-patch-update"]);
-}
-
-#[test]
-#[cfg(not(target_os = "macos"))]
-fn rad_patch_ahead_behind() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
-
- environment.repository(&profile);
-
- std::fs::write(
- environment.work(&profile).join("CONTRIBUTORS"),
- "Alice Jones\n",
- )
- .unwrap();
-
- environment
- .tests(["rad-init", "rad-patch-ahead-behind"], &profile)
- .unwrap();
-}
-
-#[test]
-fn rad_patch_change_base() {
- Environment::alice(["rad-init", "rad-patch-change-base"]);
-}
-
-#[test]
-fn rad_patch_draft() {
- Environment::alice(["rad-init", "rad-patch-draft"]);
-}
-
-#[test]
-fn rad_patch_via_push() {
- Environment::alice(["rad-init", "rad-patch-via-push"]);
-}
-
-#[test]
-fn rad_patch_detached_head() {
- Environment::alice(["rad-init", "rad-patch-detached-head"]);
-}
-
-#[test]
-fn rad_patch_merge_draft() {
- Environment::alice(["rad-init", "rad-patch-merge-draft"]);
-}
-
-#[test]
-fn rad_patch_revert_merge() {
- Environment::alice(["rad-init", "rad-patch-revert-merge"]);
-}
-
-#[test]
-#[cfg(not(target_os = "macos"))]
-fn rad_review_by_hunk() {
- Environment::alice(["rad-init", "rad-review-by-hunk"]);
-}
-
-#[test]
-fn rad_patch_delete() {
- let mut environment = Environment::new();
- let alice = environment.relay("alice");
- let bob = environment.relay("bob");
- let seed = environment.relay("seed");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut seed = seed.spawn();
-
- bob.handle.seed(acme, Scope::All).unwrap();
- seed.handle.seed(acme, Scope::All).unwrap();
- alice.connect(&bob).connect(&seed).converge([&bob, &seed]);
- bob.connect(&seed).converge([&seed]);
- bob.routes_to(&[(acme, seed.id)]);
-
- bob.rad(
- "clone",
- &[acme.to_string().as_str()],
- environment.work(&bob),
- )
- .unwrap();
-
- formula(&environment.tempdir(), "examples/rad-patch-delete.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .home(
- "seed",
- environment.work(&seed),
- [("RAD_HOME", seed.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_clean() {
let mut environment = Environment::new();
@@ -755,107 +561,6 @@ fn rad_remote() {
.unwrap();
}
-#[test]
-fn rad_merge_via_push() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
-
- environment.test("rad-init", &alice).unwrap();
-
- let alice = alice.spawn();
-
- environment.test("rad-merge-via-push", &alice).unwrap();
-}
-
-#[test]
-fn rad_merge_after_update() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
-
- environment.test("rad-init", &alice).unwrap();
-
- let alice = alice.spawn();
-
- environment.test("rad-merge-after-update", &alice).unwrap();
-}
-
-#[test]
-fn rad_merge_no_ff() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
-
- environment
- .tests(["rad-init", "rad-merge-no-ff"], &alice)
- .unwrap();
-}
-
-#[test]
-fn rad_patch_pull_update() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
-
- formula(&environment.tempdir(), "examples/rad-patch-pull-update.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- bob.home.path(),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_patch_open_explore() {
- let mut environment = Environment::new();
- let seed = environment
- .node_with(Config {
- seeding_policy: DefaultSeedingPolicy::permissive(),
- ..config::seed("seed")
- })
- .spawn();
-
- let bob = environment.profile_with(profile::Config {
- preferred_seeds: vec![seed.address()],
- ..environment.config("bob")
- });
- let mut bob = Node::new(bob).spawn();
- let working = environment.tempdir().join("working");
-
- fixtures::repository(&working);
-
- bob.connect(&seed);
- bob.init("heartwood", "", &working).unwrap();
- bob.converge([&seed]);
-
- test(
- "examples/rad-patch-open-explore.md",
- &working,
- Some(&bob.home),
- [],
- )
- .unwrap();
-}
-
#[test]
fn framework_home() {
let mut environment = Environment::new();
@@ -878,79 +583,6 @@ fn framework_home() {
.unwrap();
}
-#[test]
-fn rad_push_and_pull_patches() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.fork(acme, environment.work(&bob)).unwrap();
- alice.has_remote_of(&acme, &bob.id);
-
- formula(
- &environment.tempdir(),
- "examples/rad-push-and-pull-patches.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_patch_fetch_1() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let (repo, _) = environment.repository(&alice);
- let rid = alice.project_from("heartwood", "Radicle Heartwood Protocol & Stack", &repo);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.clone(rid, environment.work(&bob)).unwrap();
-
- formula(&environment.tempdir(), "examples/rad-patch-fetch-1.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_watch() {
let mut environment = Environment::new();
@@ -981,18 +613,6 @@ fn rad_watch() {
.unwrap();
}
-#[test]
-fn rad_patch_fetch_2() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
-
- environment
- .tests(["rad-init", "rad-patch-fetch-2"], &alice)
- .unwrap();
-}
-
#[test]
fn rad_workflow() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/patch.rs b/crates/radicle-cli/tests/commands/patch.rs
new file mode 100644
index 0000000000..4f7fb7f9da
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/patch.rs
@@ -0,0 +1,388 @@
+use crate::test;
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+use radicle::node::policy::Scope;
+use radicle::node::Handle as _;
+use radicle::prelude::RepoId;
+use radicle::test::fixtures;
+use std::str::FromStr;
+
+#[test]
+fn rad_patch() {
+ Environment::alice(["rad-init", "rad-patch"]);
+}
+
+#[test]
+fn rad_patch_diff() {
+ Environment::alice(["rad-init", "rad-patch-diff"]);
+}
+
+#[test]
+fn rad_patch_edit() {
+ Environment::alice(["rad-init", "rad-patch-edit"]);
+}
+
+#[test]
+fn rad_patch_checkout() {
+ Environment::alice(["rad-init", "rad-patch-checkout"]);
+}
+
+#[test]
+fn rad_patch_checkout_revision() {
+ Environment::alice([
+ "rad-init",
+ "rad-patch-checkout",
+ "rad-patch-checkout-revision",
+ ]);
+}
+
+#[test]
+fn rad_patch_checkout_force() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.handle.seed(acme, Scope::All).unwrap();
+ alice.connect(&bob).converge([&bob]);
+
+ bob.rad(
+ "clone",
+ &[acme.to_string().as_str()],
+ environment.work(&bob),
+ )
+ .unwrap();
+
+ formula(
+ &environment.tempdir(),
+ "examples/rad-patch-checkout-force.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_update() {
+ Environment::alice(["rad-init", "rad-patch-update"]);
+}
+
+#[test]
+#[cfg(not(target_os = "macos"))]
+fn rad_patch_ahead_behind() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+
+ environment.repository(&profile);
+
+ std::fs::write(
+ environment.work(&profile).join("CONTRIBUTORS"),
+ "Alice Jones\n",
+ )
+ .unwrap();
+
+ environment
+ .tests(["rad-init", "rad-patch-ahead-behind"], &profile)
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_change_base() {
+ Environment::alice(["rad-init", "rad-patch-change-base"]);
+}
+
+#[test]
+fn rad_patch_draft() {
+ Environment::alice(["rad-init", "rad-patch-draft"]);
+}
+
+#[test]
+fn rad_patch_via_push() {
+ Environment::alice(["rad-init", "rad-patch-via-push"]);
+}
+
+#[test]
+fn rad_patch_detached_head() {
+ Environment::alice(["rad-init", "rad-patch-detached-head"]);
+}
+
+#[test]
+fn rad_patch_merge_draft() {
+ Environment::alice(["rad-init", "rad-patch-merge-draft"]);
+}
+
+#[test]
+fn rad_patch_revert_merge() {
+ Environment::alice(["rad-init", "rad-patch-revert-merge"]);
+}
+
+#[test]
+#[cfg(not(target_os = "macos"))]
+fn rad_review_by_hunk() {
+ Environment::alice(["rad-init", "rad-review-by-hunk"]);
+}
+
+#[test]
+fn rad_patch_delete() {
+ let mut environment = Environment::new();
+ let alice = environment.relay("alice");
+ let bob = environment.relay("bob");
+ let seed = environment.relay("seed");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut seed = seed.spawn();
+
+ bob.handle.seed(acme, Scope::All).unwrap();
+ seed.handle.seed(acme, Scope::All).unwrap();
+ alice.connect(&bob).connect(&seed).converge([&bob, &seed]);
+ bob.connect(&seed).converge([&seed]);
+ bob.routes_to(&[(acme, seed.id)]);
+
+ bob.rad(
+ "clone",
+ &[acme.to_string().as_str()],
+ environment.work(&bob),
+ )
+ .unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-patch-delete.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .home(
+ "seed",
+ environment.work(&seed),
+ [("RAD_HOME", seed.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_push_and_pull_patches() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+
+ formula(
+ &environment.tempdir(),
+ "examples/rad-push-and-pull-patches.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_fetch_1() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let (repo, _) = environment.repository(&alice);
+ let rid = alice.project_from("heartwood", "Radicle Heartwood Protocol & Stack", &repo);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.clone(rid, environment.work(&bob)).unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-patch-fetch-1.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_fetch_2() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+
+ environment
+ .tests(["rad-init", "rad-patch-fetch-2"], &alice)
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_pull_update() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+
+ formula(&environment.tempdir(), "examples/rad-patch-pull-update.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ bob.home.path(),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_patch_open_explore() {
+ let mut environment = Environment::new();
+ let seed = environment
+ .node_with(radicle::node::Config {
+ seeding_policy: radicle::node::config::DefaultSeedingPolicy::permissive(),
+ ..crate::util::environment::config::seed("seed")
+ })
+ .spawn();
+
+ let bob = environment.profile_with(radicle::profile::Config {
+ preferred_seeds: vec![seed.address()],
+ ..environment.config("bob")
+ });
+ let mut bob = radicle_node::test::node::Node::new(bob).spawn();
+ let working = environment.tempdir().join("working");
+
+ fixtures::repository(&working);
+
+ bob.connect(&seed);
+ bob.init("heartwood", "", &working).unwrap();
+ bob.converge([&seed]);
+
+ test(
+ "examples/rad-patch-open-explore.md",
+ &working,
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_merge_via_push() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+
+ environment.test("rad-init", &alice).unwrap();
+
+ let alice = alice.spawn();
+
+ environment.test("rad-merge-via-push", &alice).unwrap();
+}
+
+#[test]
+fn rad_merge_after_update() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+
+ environment.test("rad-init", &alice).unwrap();
+
+ let alice = alice.spawn();
+
+ environment.test("rad-merge-after-update", &alice).unwrap();
+}
+
+#[test]
+fn rad_merge_no_ff() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+
+ environment
+ .tests(["rad-init", "rad-merge-no-ff"], &alice)
+ .unwrap();
+}
commit 704270e31086ac7376e321bf6275ee0767ca70b5
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor node command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index cf617f9401..d290cd2c2d 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -1,27 +1,23 @@
use core::panic;
use std::path::Path;
use std::str::FromStr;
-use std::{fs, net, thread, time};
+use std::{fs, thread, time};
use radicle::node;
-use radicle::node::address::Store as _;
use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::events::Event;
use radicle::node::policy::Scope;
-use radicle::node::UserAgent;
-use radicle::node::{Address, Alias, Config, Handle as _, DEFAULT_TIMEOUT};
+use radicle::node::{Alias, Config, Handle as _, DEFAULT_TIMEOUT};
use radicle::prelude::RepoId;
use radicle::profile;
use radicle::profile::Home;
use radicle::storage::{ReadStorage, RemoteRepository};
use radicle::test::fixtures;
-use radicle_localtime::LocalTime;
#[allow(unused_imports)]
use radicle_node::test::logger;
use radicle_node::test::node::Node;
-use radicle_node::PROTOCOL_VERSION;
mod util;
use util::environment::{config, Environment};
@@ -37,6 +33,7 @@ mod commands {
mod init;
mod issue;
mod jj;
+ mod node;
}
/// Run a CLI test file.
@@ -170,106 +167,6 @@ fn rad_warn_old_nodes() {
Environment::alice(["rad-warn-old-nodes"]);
}
-#[test]
-fn rad_node_connect() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let working = tempfile::tempdir().unwrap();
- let alice = alice.spawn();
- let bob = bob.spawn();
-
- alice
- .rad(
- "node",
- &["connect", format!("{}@{}", bob.id, bob.addr).as_str()],
- working.path(),
- )
- .unwrap();
-
- let sessions = alice.handle.sessions().unwrap();
- let session = sessions.first().unwrap();
-
- assert_eq!(session.nid, bob.id);
- assert_eq!(session.addr, bob.addr.into());
- assert!(session.state.is_connected());
-}
-
-#[test]
-fn rad_node_connect_without_address() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let working = tempfile::tempdir().unwrap();
- let bob = bob.spawn();
-
- alice
- .db
- .addresses_mut()
- .insert(
- &bob.id,
- PROTOCOL_VERSION,
- node::Features::SEED,
- &Alias::new("bob"),
- 0,
- &UserAgent::default(),
- LocalTime::now().into(),
- [node::KnownAddress::new(
- node::Address::from(bob.addr),
- node::address::Source::Imported,
- )],
- )
- .unwrap();
- let alice = alice.spawn();
- alice
- .rad(
- "node",
- &["connect", format!("{}", bob.id).as_str()],
- working.path(),
- )
- .unwrap();
-
- let sessions = alice.handle.sessions().unwrap();
- let session = sessions.first().unwrap();
-
- assert_eq!(session.nid, bob.id);
- assert_eq!(session.addr, bob.addr.into());
- assert!(session.state.is_connected());
-}
-
-#[test]
-fn rad_node() {
- let mut environment = Environment::new();
- let alice = environment.node_with(Config {
- external_addresses: vec![
- Address::from(net::SocketAddr::from(([41, 12, 98, 112], 8776))),
- Address::from_str("seed.cloudhead.io:8776").unwrap(),
- ],
- seeding_policy: DefaultSeedingPolicy::Block,
- ..Config::test(Alias::new("alice"))
- });
- let working = tempfile::tempdir().unwrap();
- let alice = alice.spawn();
-
- fixtures::repository(working.path().join("alice"));
-
- test(
- "examples/rad-init-sync-not-connected.md",
- working.path().join("alice"),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- test(
- "examples/rad-node.md",
- working.path().join("alice"),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
#[test]
fn rad_patch() {
Environment::alice(["rad-init", "rad-patch"]);
diff --git a/crates/radicle-cli/tests/commands/node.rs b/crates/radicle-cli/tests/commands/node.rs
new file mode 100644
index 0000000000..9cbf86fd53
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/node.rs
@@ -0,0 +1,112 @@
+use crate::test;
+use crate::util::environment::Environment;
+use radicle::node::address::Store as _;
+use radicle::node::config::DefaultSeedingPolicy;
+use radicle::node::Address;
+use radicle::node::UserAgent;
+use radicle::node::{Alias, Handle as _};
+use radicle::test::fixtures;
+use radicle_localtime::LocalTime;
+use radicle_node::PROTOCOL_VERSION;
+use std::net;
+use std::str::FromStr;
+
+#[test]
+fn rad_node_connect() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let working = tempfile::tempdir().unwrap();
+ let alice = alice.spawn();
+ let bob = bob.spawn();
+
+ alice
+ .rad(
+ "node",
+ &["connect", format!("{}@{}", bob.id, bob.addr).as_str()],
+ working.path(),
+ )
+ .unwrap();
+
+ let sessions = alice.handle.sessions().unwrap();
+ let session = sessions.first().unwrap();
+
+ assert_eq!(session.nid, bob.id);
+ assert_eq!(session.addr, bob.addr.into());
+ assert!(session.state.is_connected());
+}
+
+#[test]
+fn rad_node_connect_without_address() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let working = tempfile::tempdir().unwrap();
+ let bob = bob.spawn();
+
+ alice
+ .db
+ .addresses_mut()
+ .insert(
+ &bob.id,
+ PROTOCOL_VERSION,
+ radicle::node::Features::SEED,
+ &Alias::new("bob"),
+ 0,
+ &UserAgent::default(),
+ LocalTime::now().into(),
+ [radicle::node::KnownAddress::new(
+ radicle::node::Address::from(bob.addr),
+ radicle::node::address::Source::Imported,
+ )],
+ )
+ .unwrap();
+ let alice = alice.spawn();
+ alice
+ .rad(
+ "node",
+ &["connect", format!("{}", bob.id).as_str()],
+ working.path(),
+ )
+ .unwrap();
+
+ let sessions = alice.handle.sessions().unwrap();
+ let session = sessions.first().unwrap();
+
+ assert_eq!(session.nid, bob.id);
+ assert_eq!(session.addr, bob.addr.into());
+ assert!(session.state.is_connected());
+}
+
+#[test]
+fn rad_node() {
+ let mut environment = Environment::new();
+ let alice = environment.node_with(radicle::node::Config {
+ external_addresses: vec![
+ Address::from(net::SocketAddr::from(([41, 12, 98, 112], 8776))),
+ Address::from_str("seed.cloudhead.io:8776").unwrap(),
+ ],
+ seeding_policy: DefaultSeedingPolicy::Block,
+ ..radicle::node::Config::test(Alias::new("alice"))
+ });
+ let working = tempfile::tempdir().unwrap();
+ let alice = alice.spawn();
+
+ fixtures::repository(working.path().join("alice"));
+
+ test(
+ "examples/rad-init-sync-not-connected.md",
+ working.path().join("alice"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ test(
+ "examples/rad-node.md",
+ working.path().join("alice"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
commit 34c528e1ff45decb2b23d01f61c0c9c316bb94af
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor jj command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 60e5005925..cf617f9401 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -3,7 +3,6 @@ use std::path::Path;
use std::str::FromStr;
use std::{fs, net, thread, time};
-use radicle::git;
use radicle::node;
use radicle::node::address::Store as _;
use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
@@ -37,6 +36,7 @@ mod commands {
mod inbox;
mod init;
mod issue;
+ mod jj;
}
/// Run a CLI test file.
@@ -275,48 +275,6 @@ fn rad_patch() {
Environment::alice(["rad-init", "rad-patch"]);
}
-#[test]
-fn rad_jj_bare() {
- // We test whether `jj` is installed, and have this test succeed if it is not.
- // Programmatic skipping of tests is not supported as of 2024-08.
- if !program_reports_version("jj") {
- return;
- }
-
- let mut environment = Environment::new();
- let mut profile = environment.node("alice");
- let rid = profile.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- test(
- "examples/rad-init-existing-bare.md",
- environment.work(&profile),
- Some(&profile.home),
- [(
- "URL",
- git::url::File::new(profile.storage.path())
- .rid(rid)
- .to_string()
- .as_str(),
- )],
- )
- .unwrap();
-
- environment
- .tests(["jj-config", "jj-init-bare"], &profile)
- .unwrap();
-}
-
-#[test]
-fn rad_jj_colocated_patch() {
- // We test whether `jj` is installed, and have this test succeed if it is not.
- // Programmatic skipping of tests is not supported as of 2024-08.
- if !program_reports_version("jj") {
- return;
- }
-
- Environment::alice(["rad-init", "jj-config", "jj-init-colocate", "rad-patch-jj"])
-}
-
#[test]
fn rad_patch_diff() {
Environment::alice(["rad-init", "rad-patch-diff"]);
diff --git a/crates/radicle-cli/tests/commands/jj.rs b/crates/radicle-cli/tests/commands/jj.rs
new file mode 100644
index 0000000000..c0c01d000d
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/jj.rs
@@ -0,0 +1,45 @@
+use crate::util::environment::Environment;
+use crate::{program_reports_version, test};
+use radicle::git;
+
+#[test]
+fn rad_jj_bare() {
+ // We test whether `jj` is installed, and have this test succeed if it is not.
+ // Programmatic skipping of tests is not supported as of 2024-08.
+ if !program_reports_version("jj") {
+ return;
+ }
+
+ let mut environment = Environment::new();
+ let mut profile = environment.node("alice");
+ let rid = profile.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ test(
+ "examples/rad-init-existing-bare.md",
+ environment.work(&profile),
+ Some(&profile.home),
+ [(
+ "URL",
+ git::url::File::new(profile.storage.path())
+ .rid(rid)
+ .to_string()
+ .as_str(),
+ )],
+ )
+ .unwrap();
+
+ environment
+ .tests(["jj-config", "jj-init-bare"], &profile)
+ .unwrap();
+}
+
+#[test]
+fn rad_jj_colocated_patch() {
+ // We test whether `jj` is installed, and have this test succeed if it is not.
+ // Programmatic skipping of tests is not supported as of 2024-08.
+ if !program_reports_version("jj") {
+ return;
+ }
+
+ Environment::alice(["rad-init", "jj-config", "jj-init-colocate", "rad-patch-jj"])
+}
commit ab9231c51879f090a3b1a02f554a07aaf388d4f3
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor issue command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index a84a562d80..60e5005925 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -36,6 +36,7 @@ mod commands {
mod id;
mod inbox;
mod init;
+ mod issue;
}
/// Run a CLI test file.
@@ -124,16 +125,6 @@ fn rad_auth_errors() {
test("examples/rad-auth-errors.md", Path::new("."), None, []).unwrap();
}
-#[test]
-fn rad_issue() {
- Environment::alice(["rad-init", "rad-issue"]);
-}
-
-#[test]
-fn rad_issue_list() {
- Environment::alice(["rad-init", "rad-issue", "rad-issue-list"]);
-}
-
#[test]
fn rad_inspect() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/issue.rs b/crates/radicle-cli/tests/commands/issue.rs
new file mode 100644
index 0000000000..c8b63d46f0
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/issue.rs
@@ -0,0 +1,11 @@
+use crate::util::environment::Environment;
+
+#[test]
+fn rad_issue() {
+ Environment::alice(["rad-init", "rad-issue"]);
+}
+
+#[test]
+fn rad_issue_list() {
+ Environment::alice(["rad-init", "rad-issue", "rad-issue-list"]);
+}
commit 6a4e57f7a918a52b5eea5746112d6b1efac30d5f
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor init command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index eef0f7640c..a84a562d80 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -35,6 +35,7 @@ mod commands {
mod git;
mod id;
mod inbox;
+ mod init;
}
/// Run a CLI test file.
@@ -133,97 +134,6 @@ fn rad_issue_list() {
Environment::alice(["rad-init", "rad-issue", "rad-issue-list"]);
}
-#[test]
-#[ignore = "part of many other tests"]
-fn rad_init() {
- Environment::alice(["rad-init"]);
-}
-
-#[test]
-fn rad_init_bare() {
- let mut env = Environment::new();
- let alice = env.profile("alice");
- radicle::test::fixtures::bare_repository(env.work(&alice).as_path());
- env.tests(["git/git-is-bare-repository", "rad-init"], &alice)
- .unwrap();
-}
-
-#[test]
-fn rad_init_existing() {
- let mut environment = Environment::new();
- let mut profile = environment.node("alice");
- let working = tempfile::tempdir().unwrap();
- let rid = profile.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- test(
- "examples/rad-init-existing.md",
- working.path(),
- Some(&profile.home),
- [(
- "URL",
- git::url::File::new(profile.storage.path())
- .rid(rid)
- .to_string()
- .as_str(),
- )],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_init_existing_bare() {
- let mut environment = Environment::new();
- let mut profile = environment.node("alice");
- let working = tempfile::tempdir().unwrap();
- let rid = profile.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- test(
- "examples/rad-init-existing-bare.md",
- working.path(),
- Some(&profile.home),
- [(
- "URL",
- git::url::File::new(profile.storage.path())
- .rid(rid)
- .to_string()
- .as_str(),
- )],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_init_no_seed() {
- Environment::alice(["rad-init-no-seed"]);
-}
-
-#[test]
-fn rad_init_with_existing_remote() {
- Environment::alice(["rad-init-with-existing-remote"]);
-}
-
-#[test]
-fn rad_init_no_git() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
-
- // NOTE: There is no repository set up here.
-
- environment.test("rad-init-no-git", &profile).unwrap();
-}
-
-#[test]
-fn rad_init_detached_head() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
-
- // NOTE: There is no repository set up here.
-
- environment
- .test("rad-init-detached-head", &profile)
- .unwrap();
-}
-
#[test]
fn rad_inspect() {
let mut environment = Environment::new();
@@ -776,120 +686,6 @@ fn rad_self() {
test("examples/rad-self.md", working, Some(&alice.home), []).unwrap();
}
-#[test]
-fn rad_init_sync_not_connected() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let working = tempfile::tempdir().unwrap();
- let alice = alice.spawn();
-
- fixtures::repository(working.path().join("alice"));
-
- test(
- "examples/rad-init-sync-not-connected.md",
- working.path().join("alice"),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_init_sync_preferred() {
- let mut environment = Environment::new();
- let mut alice = environment
- .node_with(Config {
- seeding_policy: DefaultSeedingPolicy::permissive(),
- ..Config::test(Alias::new("alice"))
- })
- .spawn();
-
- let bob = environment.profile_with(profile::Config {
- preferred_seeds: vec![alice.address()],
- ..environment.config("bob")
- });
- let mut bob = Node::new(bob).spawn();
-
- bob.connect(&alice);
- alice.handle.follow(bob.id, None).unwrap();
-
- environment.repository(&bob);
-
- // Bob initializes a repo after her node has started, and after bob has connected to it.
- test(
- "examples/rad-init-sync-preferred.md",
- environment.work(&bob),
- Some(&bob.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_init_sync_timeout() {
- let mut environment = Environment::new();
- let mut alice = environment
- .node_with(Config {
- seeding_policy: DefaultSeedingPolicy::Block,
- ..Config::test(Alias::new("alice"))
- })
- .spawn();
-
- let bob = environment.profile_with(profile::Config {
- preferred_seeds: vec![alice.address()],
- ..environment.config("bob")
- });
- let mut bob = Node::new(bob).spawn();
-
- bob.connect(&alice);
- alice.handle.follow(bob.id, None).unwrap();
-
- environment.repository(&bob);
-
- // Bob initializes a repo after her node has started, and after bob has connected to it.
- test(
- "examples/rad-init-sync-timeout.md",
- environment.work(&bob),
- Some(&bob.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_init_sync_and_clone() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice);
-
- environment.repository(&alice);
-
- // Alice initializes a repo after her node has started, and after bob has connected to it.
- test(
- "examples/rad-init-sync.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- // Wait for bob to get any updates to the routing table.
- bob.converge([&alice]);
-
- test(
- "examples/rad-clone.md",
- environment.work(&bob),
- Some(&bob.home),
- [],
- )
- .unwrap();
-}
-
#[test]
fn rad_fetch() {
let mut environment = Environment::new();
@@ -911,27 +707,6 @@ fn rad_fetch() {
environment.test("rad-fetch", &bob).unwrap();
}
-#[test]
-fn rad_fork() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let mut alice = alice.spawn();
- let bob = bob.spawn();
-
- alice.connect(&bob);
- environment.repository(&alice);
-
- // Alice initializes a repo after her node has started, and after bob has connected to it.
- environment.test("rad-init-sync", &alice).unwrap();
-
- // Wait for bob to get any updates to the routing table.
- bob.converge([&alice]);
-
- environment.tests(["rad-fetch", "rad-fork"], &bob).unwrap();
-}
-
#[cfg(unix)]
#[test]
fn rad_diff() {
@@ -1235,135 +1010,6 @@ fn rad_patch_open_explore() {
.unwrap();
}
-#[test]
-fn rad_init_private() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
-
- environment.test("rad-init-private", &alice).unwrap();
-}
-
-#[test]
-fn rad_init_private_no_seed() {
- Environment::alice(["rad-init-private-no-seed"]);
-}
-
-#[test]
-fn rad_init_private_seed() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- environment.test("rad-init-private", &alice).unwrap();
-
- bob.connect(&alice).converge([&alice]);
-
- formula(&environment.tempdir(), "examples/rad-init-private-seed.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- bob.home.path(),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_init_private_clone() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- environment.test("rad-init-private", &alice).unwrap();
-
- bob.connect(&alice).converge([&alice]);
-
- formula(&environment.tempdir(), "examples/rad-init-private-clone.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- bob.home.path(),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_init_private_clone_seed() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- test(
- "examples/rad-init-private.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- bob.connect(&alice).converge([&alice]);
-
- formula(
- &environment.tempdir(),
- "examples/rad-init-private-clone-seed.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- bob.home.path(),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_publish() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
-
- environment
- .tests(["rad-init-private", "rad-publish"], &alice)
- .unwrap();
-}
-
#[test]
fn framework_home() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/init.rs b/crates/radicle-cli/tests/commands/init.rs
new file mode 100644
index 0000000000..dcb4cd2372
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/init.rs
@@ -0,0 +1,342 @@
+use crate::test;
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+use radicle::git;
+use radicle::node::config::DefaultSeedingPolicy;
+use radicle::node::{Alias, Handle as _};
+use radicle::profile;
+use radicle_node::test::node::Node;
+
+#[test]
+#[ignore = "part of many other tests"]
+fn rad_init() {
+ Environment::alice(["rad-init"]);
+}
+
+#[test]
+fn rad_init_bare() {
+ let mut env = Environment::new();
+ let alice = env.profile("alice");
+ radicle::test::fixtures::bare_repository(env.work(&alice).as_path());
+ env.tests(["git/git-is-bare-repository", "rad-init"], &alice)
+ .unwrap();
+}
+
+#[test]
+fn rad_init_existing() {
+ let mut environment = Environment::new();
+ let mut profile = environment.node("alice");
+ let working = tempfile::tempdir().unwrap();
+ let rid = profile.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ test(
+ "examples/rad-init-existing.md",
+ working.path(),
+ Some(&profile.home),
+ [(
+ "URL",
+ git::url::File::new(profile.storage.path())
+ .rid(rid)
+ .to_string()
+ .as_str(),
+ )],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_init_existing_bare() {
+ let mut environment = Environment::new();
+ let mut profile = environment.node("alice");
+ let working = tempfile::tempdir().unwrap();
+ let rid = profile.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ test(
+ "examples/rad-init-existing-bare.md",
+ working.path(),
+ Some(&profile.home),
+ [(
+ "URL",
+ git::url::File::new(profile.storage.path())
+ .rid(rid)
+ .to_string()
+ .as_str(),
+ )],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_init_no_seed() {
+ Environment::alice(["rad-init-no-seed"]);
+}
+
+#[test]
+fn rad_init_with_existing_remote() {
+ Environment::alice(["rad-init-with-existing-remote"]);
+}
+
+#[test]
+fn rad_init_no_git() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+
+ // NOTE: There is no repository set up here.
+
+ environment.test("rad-init-no-git", &profile).unwrap();
+}
+
+#[test]
+fn rad_init_detached_head() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+
+ // NOTE: There is no repository set up here.
+
+ environment
+ .test("rad-init-detached-head", &profile)
+ .unwrap();
+}
+
+#[test]
+fn rad_init_sync_not_connected() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let working = tempfile::tempdir().unwrap();
+ let alice = alice.spawn();
+
+ radicle::test::fixtures::repository(working.path().join("alice"));
+
+ test(
+ "examples/rad-init-sync-not-connected.md",
+ working.path().join("alice"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_init_sync_preferred() {
+ let mut environment = Environment::new();
+ let mut alice = environment
+ .node_with(radicle::node::Config {
+ seeding_policy: DefaultSeedingPolicy::permissive(),
+ ..radicle::node::Config::test(Alias::new("alice"))
+ })
+ .spawn();
+
+ let bob = environment.profile_with(profile::Config {
+ preferred_seeds: vec![alice.address()],
+ ..environment.config("bob")
+ });
+ let mut bob = Node::new(bob).spawn();
+
+ bob.connect(&alice);
+ alice.handle.follow(bob.id, None).unwrap();
+
+ environment.repository(&bob);
+
+ // Bob initializes a repo after her node has started, and after bob has connected to it.
+ test(
+ "examples/rad-init-sync-preferred.md",
+ environment.work(&bob),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_init_sync_timeout() {
+ let mut environment = Environment::new();
+ let mut alice = environment
+ .node_with(radicle::node::Config {
+ seeding_policy: DefaultSeedingPolicy::Block,
+ ..radicle::node::Config::test(Alias::new("alice"))
+ })
+ .spawn();
+
+ let bob = environment.profile_with(profile::Config {
+ preferred_seeds: vec![alice.address()],
+ ..environment.config("bob")
+ });
+ let mut bob = Node::new(bob).spawn();
+
+ bob.connect(&alice);
+ alice.handle.follow(bob.id, None).unwrap();
+
+ environment.repository(&bob);
+
+ // Bob initializes a repo after her node has started, and after bob has connected to it.
+ test(
+ "examples/rad-init-sync-timeout.md",
+ environment.work(&bob),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_init_sync_and_clone() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice);
+
+ environment.repository(&alice);
+
+ // Alice initializes a repo after her node has started, and after bob has connected to it.
+ test(
+ "examples/rad-init-sync.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ // Wait for bob to get any updates to the routing table.
+ bob.converge([&alice]);
+
+ test(
+ "examples/rad-clone.md",
+ environment.work(&bob),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_init_private() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+
+ environment.test("rad-init-private", &alice).unwrap();
+}
+
+#[test]
+fn rad_init_private_no_seed() {
+ Environment::alice(["rad-init-private-no-seed"]);
+}
+
+#[test]
+fn rad_init_private_seed() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ environment.test("rad-init-private", &alice).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+
+ formula(&environment.tempdir(), "examples/rad-init-private-seed.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ bob.home.path(),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_init_private_clone() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ environment.test("rad-init-private", &alice).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+
+ formula(&environment.tempdir(), "examples/rad-init-private-clone.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ bob.home.path(),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_init_private_clone_seed() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ test(
+ "examples/rad-init-private.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+
+ formula(
+ &environment.tempdir(),
+ "examples/rad-init-private-clone-seed.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ bob.home.path(),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_publish() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+
+ environment
+ .tests(["rad-init-private", "rad-publish"], &alice)
+ .unwrap();
+}
commit 3f46ead076b04d43c673f1bf6ad6ca292cf0a828
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor inbox command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 60a2e6ce38..eef0f7640c 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -34,6 +34,7 @@ mod commands {
mod cob;
mod git;
mod id;
+ mod inbox;
}
/// Run a CLI test file.
@@ -1488,39 +1489,6 @@ fn rad_watch() {
.unwrap();
}
-#[test]
-fn rad_inbox() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let (repo1, _) = fixtures::repository(environment.work(&alice).join("heartwood"));
- let (repo2, _) = fixtures::repository(environment.work(&alice).join("radicle-git"));
- let rid1 = alice.project_from("heartwood", "Radicle Heartwood Protocol & Stack", &repo1);
- let rid2 = alice.project_from("radicle-git", "Radicle Git", &repo2);
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.clone(rid1, environment.work(&bob)).unwrap();
- bob.clone(rid2, environment.work(&bob)).unwrap();
-
- formula(&environment.tempdir(), "examples/rad-inbox.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_patch_fetch_2() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/inbox.rs b/crates/radicle-cli/tests/commands/inbox.rs
new file mode 100644
index 0000000000..17a380f11e
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/inbox.rs
@@ -0,0 +1,36 @@
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+use radicle::test::fixtures;
+
+#[test]
+fn rad_inbox() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let (repo1, _) = fixtures::repository(environment.work(&alice).join("heartwood"));
+ let (repo2, _) = fixtures::repository(environment.work(&alice).join("radicle-git"));
+ let rid1 = alice.project_from("heartwood", "Radicle Heartwood Protocol & Stack", &repo1);
+ let rid2 = alice.project_from("radicle-git", "Radicle Git", &repo2);
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.clone(rid1, environment.work(&bob)).unwrap();
+ bob.clone(rid2, environment.work(&bob)).unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-inbox.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
commit 0022fc06198baed1b8692fac20851f1ee67ed7ee
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor id command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 97facee4d5..60a2e6ce38 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -33,6 +33,7 @@ mod commands {
mod clone;
mod cob;
mod git;
+ mod id;
}
/// Run a CLI test file.
@@ -267,428 +268,6 @@ fn rad_warn_old_nodes() {
Environment::alice(["rad-warn-old-nodes"]);
}
-#[test]
-fn rad_id() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let bob = bob.spawn();
-
- alice.handle.seed(acme, Scope::All).unwrap();
- alice.connect(&bob).converge([&bob]);
-
- let events = alice.handle.events();
- bob.fork(acme, bob.home.path()).unwrap();
- bob.announce(acme, 2, bob.home.path()).unwrap();
- alice.has_remote_of(&acme, &bob.id);
-
- // Alice must have Bob to try add them as a delegate
- events
- .wait(
- |e| matches!(e, Event::RefsFetched { .. }).then_some(()),
- time::Duration::from_secs(6),
- )
- .unwrap();
-
- test(
- "examples/rad-id.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_id_threshold() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let seed = environment.node("seed");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut seed = seed.spawn();
- let mut bob = bob.spawn();
-
- seed.handle.seed(acme, Scope::All).unwrap();
- alice.handle.seed(acme, Scope::Followed).unwrap();
- alice
- .handle
- .follow(seed.id, Some(Alias::new("seed")))
- .unwrap();
-
- alice.connect(&seed).connect(&bob);
- bob.connect(&seed);
- alice.routes_to(&[(acme, seed.id)]);
- seed.handle.fetch(acme, alice.id, DEFAULT_TIMEOUT).unwrap();
-
- formula(&environment.tempdir(), "examples/rad-id-threshold.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .home(
- "seed",
- environment.work(&seed),
- [("RAD_HOME", seed.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_id_threshold_soft_fork() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
-
- let events = bob.handle.events();
- bob.handle.seed(acme, Scope::All).unwrap();
- alice.connect(&bob).converge([&bob]);
-
- events
- .wait(
- |e| matches!(e, Event::RefsFetched { .. }).then_some(()),
- time::Duration::from_secs(6),
- )
- .unwrap();
-
- formula(
- &environment.tempdir(),
- "examples/rad-id-threshold-soft-fork.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_id_update_delete_field() {
- Environment::alice(["rad-init", "rad-id-update-delete-field"]);
-}
-
-#[test]
-fn rad_id_multi_delegate() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let eve = environment.node("eve");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut eve = eve.spawn();
-
- alice.handle.seed(acme, Scope::All).unwrap();
- bob.handle.follow(eve.id, None).unwrap();
- eve.handle.follow(bob.id, None).unwrap();
- alice.connect(&bob).converge([&bob]);
- eve.connect(&alice).converge([&alice]);
-
- bob.fork(acme, environment.work(&bob)).unwrap();
- bob.has_remote_of(&acme, &alice.id);
- alice.has_remote_of(&acme, &bob.id);
-
- eve.fork(acme, environment.work(&eve)).unwrap();
- eve.has_remote_of(&acme, &bob.id);
- alice.has_remote_of(&acme, &eve.id);
- alice.is_synced_with(&acme, &eve.id);
- alice.is_synced_with(&acme, &bob.id);
-
- // TODO: Have formula with two connected nodes and a tracked project.
- formula(&environment.tempdir(), "examples/rad-id-multi-delegate.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_id_unauthorized_delegate() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
-
- // Alice sets up the seed
- alice.handle.seed(acme, Scope::Followed).unwrap();
-
- bob.connect(&alice).converge([&alice]);
- bob.rad(
- "clone",
- &[acme.to_string().as_str()],
- environment.work(&bob),
- )
- .unwrap();
-
- formula(
- &environment.tempdir(),
- "examples/rad-id-unauthorized-delegate.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-#[ignore = "slow"]
-fn rad_id_collaboration() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let eve = environment.node("eve");
- let seed = environment.seed("seed");
- let distrustful = environment.seed("distrustful");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut eve = eve.spawn();
- let mut seed = seed.spawn();
- let mut distrustful = distrustful.spawn();
-
- // Alice sets up the seed and follows Bob and Eve via the CLI
- alice.handle.seed(acme, Scope::Followed).unwrap();
- alice
- .handle
- .follow(seed.id, Some(Alias::new("seed")))
- .unwrap();
-
- // The seed is trustful and will fetch from anyone
- seed.handle.seed(acme, Scope::All).unwrap();
-
- // The distrustful seed will only interact with Alice and Bob
- distrustful.handle.seed(acme, Scope::Followed).unwrap();
- distrustful.handle.follow(alice.id, None).unwrap();
- distrustful.handle.follow(bob.id, None).unwrap();
-
- alice
- .connect(&seed)
- .connect(&distrustful)
- .converge([&seed, &distrustful]);
- bob.connect(&seed)
- .connect(&distrustful)
- .converge([&seed, &distrustful]);
- eve.connect(&seed)
- .connect(&distrustful)
- .converge([&seed, &distrustful]);
-
- seed.handle.fetch(acme, alice.id, DEFAULT_TIMEOUT).unwrap();
- distrustful
- .handle
- .fetch(acme, alice.id, DEFAULT_TIMEOUT)
- .unwrap();
-
- formula(&environment.tempdir(), "examples/rad-id-collaboration.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .home(
- "eve",
- environment.work(&eve),
- [("RAD_HOME", eve.home.path().display())],
- )
- .run()
- .unwrap();
-
- // Ensure the seeds have fetched all nodes.
- let repo = seed.storage.repository(acme).unwrap();
- let mut remotes = repo
- .remote_ids()
- .unwrap()
- .collect::<Result<Vec<_>, _>>()
- .unwrap();
- let mut expected = vec![alice.id, bob.id, eve.id];
- remotes.sort();
- expected.sort();
- assert_eq!(remotes, expected);
-
- let repo = distrustful.storage.repository(acme).unwrap();
- let mut remotes = repo
- .remote_ids()
- .unwrap()
- .collect::<Result<Vec<_>, _>>()
- .unwrap();
- let mut expected = vec![alice.id, bob.id, eve.id];
- remotes.sort();
- expected.sort();
- assert_eq!(remotes, expected);
-}
-
-#[test]
-fn rad_id_conflict() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let bob = bob.spawn();
-
- alice.connect(&bob).converge([&bob]);
-
- bob.fork(acme, environment.work(&bob)).unwrap();
- bob.announce(acme, 2, bob.home.path()).unwrap();
- alice.has_remote_of(&acme, &bob.id);
-
- formula(&environment.tempdir(), "examples/rad-id-conflict.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn rad_id_unknown_field() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
-
- environment.repository(&alice);
- environment.test("rad-init", &alice).unwrap();
-
- let alice = alice.spawn();
- environment.test("rad-id-unknown-field", &alice).unwrap();
-}
-
-#[test]
-fn rad_id_private() {
- Environment::alice(["rad-init-private", "rad-id-private"]);
-}
-
#[test]
fn rad_node_connect() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/id.rs b/crates/radicle-cli/tests/commands/id.rs
new file mode 100644
index 0000000000..b9c350b8f8
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/id.rs
@@ -0,0 +1,433 @@
+use crate::test;
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+use radicle::node::policy::Scope;
+use radicle::node::Event;
+use radicle::node::DEFAULT_TIMEOUT;
+use radicle::node::{Alias, Handle as _};
+use radicle::prelude::RepoId;
+use radicle::storage::ReadStorage as _;
+use std::str::FromStr;
+use std::time;
+
+#[test]
+fn rad_id() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let bob = bob.spawn();
+
+ alice.handle.seed(acme, Scope::All).unwrap();
+ alice.connect(&bob).converge([&bob]);
+
+ let events = alice.handle.events();
+ bob.fork(acme, bob.home.path()).unwrap();
+ bob.announce(acme, 2, bob.home.path()).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+
+ // Alice must have Bob to try add them as a delegate
+ events
+ .wait(
+ |e| matches!(e, Event::RefsFetched { .. }).then_some(()),
+ time::Duration::from_secs(6),
+ )
+ .unwrap();
+
+ test(
+ "examples/rad-id.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_id_threshold() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let seed = environment.node("seed");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut seed = seed.spawn();
+ let mut bob = bob.spawn();
+
+ seed.handle.seed(acme, Scope::All).unwrap();
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+ alice
+ .handle
+ .follow(seed.id, Some(Alias::new("seed")))
+ .unwrap();
+
+ alice.connect(&seed).connect(&bob);
+ bob.connect(&seed);
+ alice.routes_to(&[(acme, seed.id)]);
+ seed.handle.fetch(acme, alice.id, DEFAULT_TIMEOUT).unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-id-threshold.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .home(
+ "seed",
+ environment.work(&seed),
+ [("RAD_HOME", seed.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_id_threshold_soft_fork() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ let events = bob.handle.events();
+ bob.handle.seed(acme, Scope::All).unwrap();
+ alice.connect(&bob).converge([&bob]);
+
+ events
+ .wait(
+ |e| matches!(e, Event::RefsFetched { .. }).then_some(()),
+ time::Duration::from_secs(6),
+ )
+ .unwrap();
+
+ formula(
+ &environment.tempdir(),
+ "examples/rad-id-threshold-soft-fork.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_id_update_delete_field() {
+ Environment::alice(["rad-init", "rad-id-update-delete-field"]);
+}
+
+#[test]
+fn rad_id_multi_delegate() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let eve = environment.node("eve");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+
+ alice.handle.seed(acme, Scope::All).unwrap();
+ bob.handle.follow(eve.id, None).unwrap();
+ eve.handle.follow(bob.id, None).unwrap();
+ alice.connect(&bob).converge([&bob]);
+ eve.connect(&alice).converge([&alice]);
+
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ bob.has_remote_of(&acme, &alice.id);
+ alice.has_remote_of(&acme, &bob.id);
+
+ eve.fork(acme, environment.work(&eve)).unwrap();
+ eve.has_remote_of(&acme, &bob.id);
+ alice.has_remote_of(&acme, &eve.id);
+ alice.is_synced_with(&acme, &eve.id);
+ alice.is_synced_with(&acme, &bob.id);
+
+ // TODO: Have formula with two connected nodes and a tracked project.
+ formula(&environment.tempdir(), "examples/rad-id-multi-delegate.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_id_unauthorized_delegate() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ // Alice sets up the seed
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.rad(
+ "clone",
+ &[acme.to_string().as_str()],
+ environment.work(&bob),
+ )
+ .unwrap();
+
+ formula(
+ &environment.tempdir(),
+ "examples/rad-id-unauthorized-delegate.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+#[ignore = "slow"]
+fn rad_id_collaboration() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let eve = environment.node("eve");
+ let seed = environment.seed("seed");
+ let distrustful = environment.seed("distrustful");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+ let mut seed = seed.spawn();
+ let mut distrustful = distrustful.spawn();
+
+ // Alice sets up the seed and follows Bob and Eve via the CLI
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+ alice
+ .handle
+ .follow(seed.id, Some(Alias::new("seed")))
+ .unwrap();
+
+ // The seed is trustful and will fetch from anyone
+ seed.handle.seed(acme, Scope::All).unwrap();
+
+ // The distrustful seed will only interact with Alice and Bob
+ distrustful.handle.seed(acme, Scope::Followed).unwrap();
+ distrustful.handle.follow(alice.id, None).unwrap();
+ distrustful.handle.follow(bob.id, None).unwrap();
+
+ alice
+ .connect(&seed)
+ .connect(&distrustful)
+ .converge([&seed, &distrustful]);
+ bob.connect(&seed)
+ .connect(&distrustful)
+ .converge([&seed, &distrustful]);
+ eve.connect(&seed)
+ .connect(&distrustful)
+ .converge([&seed, &distrustful]);
+
+ seed.handle.fetch(acme, alice.id, DEFAULT_TIMEOUT).unwrap();
+ distrustful
+ .handle
+ .fetch(acme, alice.id, DEFAULT_TIMEOUT)
+ .unwrap();
+
+ formula(&environment.tempdir(), "examples/rad-id-collaboration.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .home(
+ "eve",
+ environment.work(&eve),
+ [("RAD_HOME", eve.home.path().display())],
+ )
+ .run()
+ .unwrap();
+
+ // Ensure the seeds have fetched all nodes.
+ let repo = seed.storage.repository(acme).unwrap();
+ let mut remotes = repo
+ .remote_ids()
+ .unwrap()
+ .collect::<Result<Vec<_>, _>>()
+ .unwrap();
+ let mut expected = vec![alice.id, bob.id, eve.id];
+ remotes.sort();
+ expected.sort();
+ assert_eq!(remotes, expected);
+
+ let repo = distrustful.storage.repository(acme).unwrap();
+ let mut remotes = repo
+ .remote_ids()
+ .unwrap()
+ .collect::<Result<Vec<_>, _>>()
+ .unwrap();
+ let mut expected = vec![alice.id, bob.id, eve.id];
+ remotes.sort();
+ expected.sort();
+ assert_eq!(remotes, expected);
+}
+
+#[test]
+fn rad_id_conflict() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let bob = bob.spawn();
+
+ alice.connect(&bob).converge([&bob]);
+
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ bob.announce(acme, 2, bob.home.path()).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+
+ formula(&environment.tempdir(), "examples/rad-id-conflict.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn rad_id_unknown_field() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+
+ environment.repository(&alice);
+ environment.test("rad-init", &alice).unwrap();
+
+ let alice = alice.spawn();
+ environment.test("rad-id-unknown-field", &alice).unwrap();
+}
+
+#[test]
+fn rad_id_private() {
+ Environment::alice(["rad-init-private", "rad-id-private"]);
+}
commit 6cf266978e9fdf4277de9c5329ab6f35cdfee7db
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor git command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 76b1762ab0..97facee4d5 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -32,6 +32,7 @@ mod commands {
mod checkout;
mod clone;
mod cob;
+ mod git;
}
/// Run a CLI test file.
@@ -1805,194 +1806,6 @@ fn framework_home() {
.unwrap();
}
-#[test]
-fn git_push_diverge() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.fork(acme, environment.work(&bob)).unwrap();
- alice.has_remote_of(&acme, &bob.id);
-
- formula(&environment.tempdir(), "examples/git/git-push-diverge.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn git_push_converge() {
- use std::fs;
-
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let eve = environment.node("eve");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut eve = eve.spawn();
-
- bob.connect(&alice).connect(&eve).converge([&alice]);
- eve.connect(&alice).converge([&alice]);
- bob.fork(acme, environment.work(&bob)).unwrap();
- eve.fork(acme, environment.work(&eve)).unwrap();
- alice.has_remote_of(&acme, &bob.id);
- alice.has_remote_of(&acme, &eve.id);
-
- fs::write(
- environment.work(&bob).join("heartwood").join("README"),
- "Hello\n",
- )
- .unwrap();
- fs::write(
- environment.work(&eve).join("heartwood").join("README"),
- "Hello, world!\n",
- )
- .unwrap();
-
- formula(&environment.tempdir(), "examples/git/git-push-converge.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .home(
- "eve",
- environment.work(&eve).join("heartwood"),
- [("RAD_HOME", eve.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn git_push_amend() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.fork(acme, environment.work(&bob)).unwrap();
- alice.has_remote_of(&acme, &bob.id);
-
- formula(&environment.tempdir(), "examples/git/git-push-amend.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn git_push_force_with_lease() {
- Environment::alice(["rad-init", "git/git-push-force-with-lease"]);
-}
-
-#[test]
-fn git_push_rollback() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.fork(acme, environment.work(&bob)).unwrap();
- alice.has_remote_of(&acme, &bob.id);
-
- formula(&environment.tempdir(), "examples/git/git-push-rollback.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob).join("heartwood"),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_push_and_pull_patches() {
let mut environment = Environment::new();
@@ -2141,156 +1954,6 @@ fn rad_patch_fetch_2() {
.unwrap();
}
-#[test]
-fn git_push_and_fetch() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
-
- environment.test("rad-clone", &bob).unwrap();
- environment.test("git/git-push", &alice).unwrap();
- environment.test("git/git-fetch", &bob).unwrap();
- environment.test("git/git-push-delete", &alice).unwrap();
-}
-
-#[test]
-fn git_tag() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- environment.repository(&alice);
-
- environment.test("rad-init", &alice).unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
-
- test(
- "examples/rad-clone.md",
- environment.work(&bob),
- Some(&bob.home),
- [],
- )
- .unwrap();
-
- formula(&environment.tempdir(), "examples/git/git-tag.md")
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn git_push_canonical_lightweight_tags() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- fixtures::repository(environment.work(&alice));
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.clone(rid, environment.work(&bob)).unwrap();
- formula(
- &environment.tempdir(),
- "examples/git/git-push-canonical-lightweight-tags.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
-#[test]
-fn git_push_canonical_annotated_tags() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
-
- fixtures::repository(environment.work(&alice));
-
- test(
- "examples/rad-init.md",
- environment.work(&alice),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let alice = alice.spawn();
- let mut bob = bob.spawn();
-
- bob.connect(&alice).converge([&alice]);
- bob.clone(rid, environment.work(&bob)).unwrap();
- formula(
- &environment.tempdir(),
- "examples/git/git-push-canonical-annotated-tags.md",
- )
- .unwrap()
- .home(
- "alice",
- environment.work(&alice),
- [("RAD_HOME", alice.home.path().display())],
- )
- .home(
- "bob",
- environment.work(&bob),
- [("RAD_HOME", bob.home.path().display())],
- )
- .run()
- .unwrap();
-}
-
#[test]
fn rad_workflow() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/git.rs b/crates/radicle-cli/tests/commands/git.rs
new file mode 100644
index 0000000000..a8b3c58c89
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/git.rs
@@ -0,0 +1,344 @@
+use crate::test;
+use crate::util::environment::Environment;
+use crate::util::formula::formula;
+use radicle::prelude::RepoId;
+use radicle::test::fixtures;
+use std::str::FromStr;
+
+#[test]
+fn git_push_diverge() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+
+ formula(&environment.tempdir(), "examples/git/git-push-diverge.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn git_push_converge() {
+ use std::fs;
+
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let eve = environment.node("eve");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+
+ bob.connect(&alice).connect(&eve).converge([&alice]);
+ eve.connect(&alice).converge([&alice]);
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ eve.fork(acme, environment.work(&eve)).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+ alice.has_remote_of(&acme, &eve.id);
+
+ fs::write(
+ environment.work(&bob).join("heartwood").join("README"),
+ "Hello\n",
+ )
+ .unwrap();
+ fs::write(
+ environment.work(&eve).join("heartwood").join("README"),
+ "Hello, world!\n",
+ )
+ .unwrap();
+
+ formula(&environment.tempdir(), "examples/git/git-push-converge.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .home(
+ "eve",
+ environment.work(&eve).join("heartwood"),
+ [("RAD_HOME", eve.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn git_push_amend() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+
+ formula(&environment.tempdir(), "examples/git/git-push-amend.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn git_push_force_with_lease() {
+ Environment::alice(["rad-init", "git/git-push-force-with-lease"]);
+}
+
+#[test]
+fn git_push_rollback() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.fork(acme, environment.work(&bob)).unwrap();
+ alice.has_remote_of(&acme, &bob.id);
+
+ formula(&environment.tempdir(), "examples/git/git-push-rollback.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob).join("heartwood"),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn git_push_and_fetch() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+
+ environment.test("rad-clone", &bob).unwrap();
+ environment.test("git/git-push", &alice).unwrap();
+ environment.test("git/git-fetch", &bob).unwrap();
+ environment.test("git/git-push-delete", &alice).unwrap();
+}
+
+#[test]
+fn git_tag() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ environment.repository(&alice);
+
+ environment.test("rad-init", &alice).unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+
+ test(
+ "examples/rad-clone.md",
+ environment.work(&bob),
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+
+ formula(&environment.tempdir(), "examples/git/git-tag.md")
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn git_push_canonical_lightweight_tags() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ fixtures::repository(environment.work(&alice));
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.clone(rid, environment.work(&bob)).unwrap();
+ formula(
+ &environment.tempdir(),
+ "examples/git/git-push-canonical-lightweight-tags.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
+
+#[test]
+fn git_push_canonical_annotated_tags() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let rid = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+
+ fixtures::repository(environment.work(&alice));
+
+ test(
+ "examples/rad-init.md",
+ environment.work(&alice),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ bob.connect(&alice).converge([&alice]);
+ bob.clone(rid, environment.work(&bob)).unwrap();
+ formula(
+ &environment.tempdir(),
+ "examples/git/git-push-canonical-annotated-tags.md",
+ )
+ .unwrap()
+ .home(
+ "alice",
+ environment.work(&alice),
+ [("RAD_HOME", alice.home.path().display())],
+ )
+ .home(
+ "bob",
+ environment.work(&bob),
+ [("RAD_HOME", bob.home.path().display())],
+ )
+ .run()
+ .unwrap();
+}
commit 80e33ea70466c6084514fd6479e6786f9c6b0ca8
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor cob command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 1254083780..76b1762ab0 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -3,7 +3,6 @@ use std::path::Path;
use std::str::FromStr;
use std::{fs, net, thread, time};
-use radicle::cob;
use radicle::git;
use radicle::node;
use radicle::node::address::Store as _;
@@ -16,7 +15,7 @@ use radicle::node::{Address, Alias, Config, Handle as _, DEFAULT_TIMEOUT};
use radicle::prelude::RepoId;
use radicle::profile;
use radicle::profile::Home;
-use radicle::storage::{ReadStorage, RefUpdate, RemoteRepository};
+use radicle::storage::{ReadStorage, RemoteRepository};
use radicle::test::fixtures;
use radicle_localtime::LocalTime;
@@ -32,6 +31,7 @@ use util::formula::formula;
mod commands {
mod checkout;
mod clone;
+ mod cob;
}
/// Run a CLI test file.
@@ -130,101 +130,6 @@ fn rad_issue_list() {
Environment::alice(["rad-init", "rad-issue", "rad-issue-list"]);
}
-#[test]
-fn rad_cob_update() {
- Environment::alice(["rad-init", "rad-cob-log"]);
-}
-
-#[test]
-fn rad_cob_update_identity() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
- let working = environment.tempdir().join("working");
- let home = &profile.home;
-
- let base = Path::new(env!("CARGO_MANIFEST_DIR"));
-
- std::fs::create_dir_all(base).unwrap();
- std::fs::create_dir_all(working.clone()).unwrap();
-
- // Setup a test repository.
- fixtures::repository(&working);
-
- test("examples/rad-init.md", &working, Some(home), []).unwrap();
- test(
- "examples/rad-cob-update-identity.md",
- &working,
- Some(home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_cob_multiset() {
- // `rad-cob-multiset` is a `jq` script, which requires `jq` to be installed.
- // We test whether `jq` is installed, and have this test succeed if it is not.
- // Programmatic skipping of tests is not supported as of 2024-08.
- if !program_reports_version("jq") {
- return;
- }
-
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
- let home = &profile.home;
- let working = environment.tempdir().join("working");
-
- let base = Path::new(env!("CARGO_MANIFEST_DIR"));
- std::fs::create_dir_all(base).unwrap();
- std::fs::create_dir_all(working.clone()).unwrap();
-
- // Copy over the script that implements the multiset COB.
- std::fs::copy(
- base.join("examples").join("rad-cob-multiset"),
- working.join("rad-cob-multiset"),
- )
- .unwrap();
-
- // Setup a test repository.
- fixtures::repository(&working);
-
- test("examples/rad-init.md", &working, Some(home), []).unwrap();
- test("examples/rad-cob-multiset.md", &working, Some(home), []).unwrap();
-}
-
-#[test]
-fn rad_cob_log() {
- Environment::alice(["rad-init", "rad-cob-log"]);
-}
-
-#[test]
-fn rad_cob_show() {
- Environment::alice(["rad-init", "rad-cob-show"]);
-}
-
-#[test]
-fn rad_cob_migrate() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
- let home = &profile.home;
-
- home.cobs_db_mut()
- .unwrap()
- .raw_query(|conn| conn.execute("PRAGMA user_version = 0"))
- .unwrap();
-
- environment.repository(&profile);
-
- environment
- .tests(["rad-init", "rad-cob-migrate"], &profile)
- .unwrap();
-}
-
-#[test]
-fn rad_cob_operations() {
- Environment::alice(["rad-init", "rad-cob-operations"]);
-}
-
#[test]
#[ignore = "part of many other tests"]
fn rad_init() {
@@ -1463,128 +1368,6 @@ fn rad_diff() {
test("examples/rad-diff.md", tmp, None, []).unwrap();
}
-#[test]
-fn test_cob_replication() {
- let mut environment = Environment::new();
- let working = tempfile::tempdir().unwrap();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let rid = alice.project("heartwood", "");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let events = alice.handle.events();
-
- alice.handle.follow(bob.id, None).unwrap();
- alice.connect(&bob);
-
- bob.routes_to(&[(rid, alice.id)]);
- bob.fork(rid, working.path()).unwrap();
-
- // Wait for Alice to fetch the clone refs.
- events
- .wait(
- |e| {
- matches!(
- e,
- Event::RefsFetched { updated, .. }
- if updated.iter().any(|u| matches!(u, RefUpdate::Created { .. }))
- )
- .then_some(())
- },
- time::Duration::from_secs(6),
- )
- .unwrap();
-
- let bob_repo = bob.storage.repository(rid).unwrap();
- let mut bob_issues = radicle::cob::issue::Issues::open(&bob_repo).unwrap();
- let mut bob_cache = radicle::cob::cache::InMemory::default();
- let issue = bob_issues
- .create(
- cob::Title::new("Something's fishy").unwrap(),
- "I don't know what it is",
- &[],
- &[],
- [],
- &mut bob_cache,
- &bob.signer,
- )
- .unwrap();
- log::debug!(target: "test", "Issue {} created", issue.id());
-
- // Make sure that Bob's issue refs announcement has a different timestamp than his fork's
- // announcement, otherwise Alice will consider it stale.
- thread::sleep(time::Duration::from_millis(3));
-
- bob.handle.announce_refs_for(rid, [bob.id]).unwrap();
-
- // Wait for Alice to fetch the issue refs.
- events
- .iter()
- .find(|e| matches!(e, Event::RefsFetched { .. }))
- .unwrap();
-
- let alice_repo = alice.storage.repository(rid).unwrap();
- let alice_issues = radicle::cob::issue::Issues::open(&alice_repo).unwrap();
- let alice_issue = alice_issues.get(issue.id()).unwrap().unwrap();
-
- assert_eq!(alice_issue.title(), "Something's fishy");
-}
-
-#[test]
-fn test_cob_deletion() {
- let mut environment = Environment::new();
- let working = tempfile::tempdir().unwrap();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
-
- let rid = alice.project("heartwood", "");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
-
- alice.handle.seed(rid, Scope::All).unwrap();
- bob.handle.seed(rid, Scope::All).unwrap();
- alice.connect(&bob);
- bob.routes_to(&[(rid, alice.id)]);
-
- let alice_repo = alice.storage.repository(rid).unwrap();
- let mut alice_issues = radicle::cob::issue::Cache::no_cache(&alice_repo).unwrap();
- let issue = alice_issues
- .create(
- cob::Title::new("Something's fishy").unwrap(),
- "I don't know what it is",
- &[],
- &[],
- [],
- &alice.signer,
- )
- .unwrap();
- let issue_id = issue.id();
- log::debug!(target: "test", "Issue {issue_id} created");
-
- bob.rad("clone", &[rid.to_string().as_str()], working.path())
- .unwrap();
-
- let bob_repo = bob.storage.repository(rid).unwrap();
- let bob_issues = radicle::cob::issue::Issues::open(&bob_repo).unwrap();
- assert!(bob_issues.get(issue_id).unwrap().is_some());
-
- let mut alice_issues = radicle::cob::issue::Cache::no_cache(&alice_repo).unwrap();
- alice_issues.remove(issue_id, &alice.signer).unwrap();
-
- log::debug!(target: "test", "Removing issue..");
-
- radicle::assert_matches!(
- bob.handle.fetch(rid, alice.id, DEFAULT_TIMEOUT).unwrap(),
- radicle::node::FetchResult::Success { .. }
- );
- let bob_repo = bob.storage.repository(rid).unwrap();
- let bob_issues = radicle::cob::issue::Issues::open(&bob_repo).unwrap();
- assert!(bob_issues.get(issue_id).unwrap().is_none());
-}
-
#[test]
fn rad_sync() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/cob.rs b/crates/radicle-cli/tests/commands/cob.rs
new file mode 100644
index 0000000000..b4fe0cbaed
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/cob.rs
@@ -0,0 +1,230 @@
+use std::path::Path;
+
+use crate::util::environment::Environment;
+use crate::{program_reports_version, test};
+use radicle::node::Handle;
+use radicle::test::fixtures;
+
+#[test]
+fn rad_cob_update() {
+ Environment::alice(["rad-init", "rad-cob-log"]);
+}
+
+#[test]
+fn rad_cob_update_identity() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+ let working = environment.tempdir().join("working");
+ let home = &profile.home;
+
+ let base = Path::new(env!("CARGO_MANIFEST_DIR"));
+
+ std::fs::create_dir_all(base).unwrap();
+ std::fs::create_dir_all(working.clone()).unwrap();
+
+ // Setup a test repository.
+ fixtures::repository(&working);
+
+ test("examples/rad-init.md", &working, Some(home), []).unwrap();
+ test(
+ "examples/rad-cob-update-identity.md",
+ &working,
+ Some(home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_cob_multiset() {
+ // `rad-cob-multiset` is a `jq` script, which requires `jq` to be installed.
+ // We test whether `jq` is installed, and have this test succeed if it is not.
+ // Programmatic skipping of tests is not supported as of 2024-08.
+ if !program_reports_version("jq") {
+ return;
+ }
+
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+ let home = &profile.home;
+ let working = environment.tempdir().join("working");
+
+ let base = Path::new(env!("CARGO_MANIFEST_DIR"));
+ std::fs::create_dir_all(base).unwrap();
+ std::fs::create_dir_all(working.clone()).unwrap();
+
+ // Copy over the script that implements the multiset COB.
+ std::fs::copy(
+ base.join("examples").join("rad-cob-multiset"),
+ working.join("rad-cob-multiset"),
+ )
+ .unwrap();
+
+ // Setup a test repository.
+ fixtures::repository(&working);
+
+ test("examples/rad-init.md", &working, Some(home), []).unwrap();
+ test("examples/rad-cob-multiset.md", &working, Some(home), []).unwrap();
+}
+
+#[test]
+fn rad_cob_log() {
+ Environment::alice(["rad-init", "rad-cob-log"]);
+}
+
+#[test]
+fn rad_cob_show() {
+ Environment::alice(["rad-init", "rad-cob-show"]);
+}
+
+#[test]
+fn rad_cob_migrate() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+ let home = &profile.home;
+
+ home.cobs_db_mut()
+ .unwrap()
+ .raw_query(|conn| conn.execute("PRAGMA user_version = 0"))
+ .unwrap();
+
+ environment.repository(&profile);
+
+ environment
+ .tests(["rad-init", "rad-cob-migrate"], &profile)
+ .unwrap();
+}
+
+#[test]
+fn rad_cob_operations() {
+ Environment::alice(["rad-init", "rad-cob-operations"]);
+}
+
+#[test]
+fn test_cob_replication() {
+ let mut environment = Environment::new();
+ let working = tempfile::tempdir().unwrap();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let rid = alice.project("heartwood", "");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let events = alice.handle.events();
+
+ alice.handle.follow(bob.id, None).unwrap();
+ alice.connect(&bob);
+
+ bob.routes_to(&[(rid, alice.id)]);
+ bob.fork(rid, working.path()).unwrap();
+
+ // Wait for Alice to fetch the clone refs.
+ events
+ .wait(
+ |e| {
+ matches!(
+ e,
+ radicle::node::Event::RefsFetched { updated, .. }
+ if updated.iter().any(|u| matches!(u, radicle::storage::RefUpdate::Created { .. }))
+ )
+ .then_some(())
+ },
+ std::time::Duration::from_secs(6),
+ )
+ .unwrap();
+
+ let bob_repo = radicle::storage::ReadStorage::repository(&bob.storage, rid).unwrap();
+ let mut bob_issues = radicle::cob::issue::Issues::open(&bob_repo).unwrap();
+ let mut bob_cache = radicle::cob::cache::InMemory::default();
+ let issue = bob_issues
+ .create(
+ radicle::cob::Title::new("Something's fishy").unwrap(),
+ "I don't know what it is",
+ &[],
+ &[],
+ [],
+ &mut bob_cache,
+ &bob.signer,
+ )
+ .unwrap();
+ log::debug!(target: "test", "Issue {} created", issue.id());
+
+ // Make sure that Bob's issue refs announcement has a different timestamp than his fork's
+ // announcement, otherwise Alice will consider it stale.
+ std::thread::sleep(std::time::Duration::from_millis(3));
+
+ bob.handle.announce_refs_for(rid, [bob.id]).unwrap();
+
+ // Wait for Alice to fetch the issue refs.
+ events
+ .iter()
+ .find(|e| matches!(e, radicle::node::Event::RefsFetched { .. }))
+ .unwrap();
+
+ let alice_repo = radicle::storage::ReadStorage::repository(&alice.storage, rid).unwrap();
+ let alice_issues = radicle::cob::issue::Issues::open(&alice_repo).unwrap();
+ let alice_issue = alice_issues.get(issue.id()).unwrap().unwrap();
+
+ assert_eq!(alice_issue.title(), "Something's fishy");
+}
+
+#[test]
+fn test_cob_deletion() {
+ let mut environment = Environment::new();
+ let working = tempfile::tempdir().unwrap();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+
+ let rid = alice.project("heartwood", "");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ alice
+ .handle
+ .seed(rid, radicle::node::policy::Scope::All)
+ .unwrap();
+ bob.handle
+ .seed(rid, radicle::node::policy::Scope::All)
+ .unwrap();
+ alice.connect(&bob);
+ bob.routes_to(&[(rid, alice.id)]);
+
+ let alice_repo = radicle::storage::ReadStorage::repository(&alice.storage, rid).unwrap();
+ let mut alice_issues = radicle::cob::issue::Cache::no_cache(&alice_repo).unwrap();
+ let issue = alice_issues
+ .create(
+ radicle::cob::Title::new("Something's fishy").unwrap(),
+ "I don't know what it is",
+ &[],
+ &[],
+ [],
+ &alice.signer,
+ )
+ .unwrap();
+ let issue_id = issue.id();
+ log::debug!(target: "test", "Issue {issue_id} created");
+
+ bob.rad("clone", &[rid.to_string().as_str()], working.path())
+ .unwrap();
+
+ let bob_repo = radicle::storage::ReadStorage::repository(&bob.storage, rid).unwrap();
+ let bob_issues = radicle::cob::issue::Issues::open(&bob_repo).unwrap();
+ assert!(bob_issues.get(issue_id).unwrap().is_some());
+
+ let mut alice_issues = radicle::cob::issue::Cache::no_cache(&alice_repo).unwrap();
+ alice_issues.remove(issue_id, &alice.signer).unwrap();
+
+ log::debug!(target: "test", "Removing issue..");
+
+ radicle::assert_matches!(
+ bob.handle
+ .fetch(rid, alice.id, radicle::node::DEFAULT_TIMEOUT)
+ .unwrap(),
+ radicle::node::FetchResult::Success { .. }
+ );
+ let bob_repo = radicle::storage::ReadStorage::repository(&bob.storage, rid).unwrap();
+ let bob_issues = radicle::cob::issue::Issues::open(&bob_repo).unwrap();
+ assert!(bob_issues.get(issue_id).unwrap().is_none());
+}
commit 5df70c45b7b84d34ca0f053b6572a00768559aba
Author: Adrian Duke <adrian.duke@gmail.com>
Date: Tue Mar 3 15:42:45 2026 +0000
cli/tests: Refactor clone command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 2f0155be4b..1254083780 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -11,10 +11,9 @@ use radicle::node::config::seeds::RADICLE_NODE_BOOTSTRAP_IRIS;
use radicle::node::config::DefaultSeedingPolicy;
use radicle::node::events::Event;
use radicle::node::policy::Scope;
-use radicle::node::routing::Store as _;
use radicle::node::UserAgent;
use radicle::node::{Address, Alias, Config, Handle as _, DEFAULT_TIMEOUT};
-use radicle::prelude::{NodeId, RepoId};
+use radicle::prelude::RepoId;
use radicle::profile;
use radicle::profile::Home;
use radicle::storage::{ReadStorage, RefUpdate, RemoteRepository};
@@ -32,6 +31,7 @@ use util::formula::formula;
mod commands {
mod checkout;
+ mod clone;
}
/// Run a CLI test file.
@@ -1247,250 +1247,6 @@ fn rad_block() {
test("examples/rad-block.md", working, Some(&alice.home), []).unwrap();
}
-#[test]
-fn rad_clone() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let working = environment.tempdir().join("working");
-
- // Setup a test project.
- let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- // Prevent Alice from fetching Bob's fork, as we're not testing that and it may cause errors.
- alice.handle.seed(acme, Scope::Followed).unwrap();
-
- bob.connect(&alice).converge([&alice]);
-
- test("examples/rad-clone.md", working, Some(&bob.home), []).unwrap();
-}
-
-#[test]
-fn rad_clone_bare() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let working = environment.tempdir().join("working");
-
- // Setup a test project.
- let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- // Prevent Alice from fetching Bob's fork, as we're not testing that and it may cause errors.
- alice.handle.seed(acme, Scope::Followed).unwrap();
-
- bob.connect(&alice).converge([&alice]);
-
- test("examples/rad-clone-bare.md", working, Some(&bob.home), []).unwrap();
-}
-
-#[test]
-fn rad_clone_directory() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let working = environment.tempdir().join("working");
-
- // Setup a test project.
- let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- // Prevent Alice from fetching Bob's fork, as we're not testing that and it may cause errors.
- alice.handle.seed(acme, Scope::Followed).unwrap();
-
- bob.connect(&alice).converge([&alice]);
-
- test(
- "examples/rad-clone-directory.md",
- working,
- Some(&bob.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_clone_all() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let eve = environment.node("eve");
-
- // Setup a test project.
- let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
- let mut eve = eve.spawn();
-
- alice.handle.seed(acme, Scope::All).unwrap();
- bob.connect(&alice).converge([&alice]);
- eve.connect(&alice).converge([&alice]);
-
- // Fork and sync repo.
- bob.fork(acme, bob.home.path()).unwrap();
- bob.announce(acme, 2, bob.home.path()).unwrap();
- bob.has_remote_of(&acme, &alice.id);
- alice.has_remote_of(&acme, &bob.id);
-
- test(
- "examples/rad-clone-all.md",
- environment.work(&eve),
- Some(&eve.home),
- [],
- )
- .unwrap();
- eve.has_remote_of(&acme, &bob.id);
-}
-
-#[test]
-fn rad_clone_partial_fail() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let bob = environment.node("bob");
- let mut eve = environment.node("eve");
- let carol = NodeId::from_str("z6MksFqXN3Yhqk8pTJdUGLwBTkRfQvwZXPqR2qMEhbS9wzpT").unwrap();
-
- // Setup a test project.
- let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
-
- // Make Even think she knows about a seed called "carol" that has the repo.
- eve.db
- .addresses_mut()
- .insert(
- &carol,
- PROTOCOL_VERSION,
- node::Features::SEED,
- &Alias::new("carol"),
- 0,
- &UserAgent::default(),
- LocalTime::now().into(),
- [node::KnownAddress::new(
- // Eve will fail to connect to this address.
- node::Address::from(net::SocketAddr::from(([0, 0, 0, 0], 19873))),
- node::address::Source::Imported,
- )],
- )
- .unwrap();
- eve.db
- .routing_mut()
- .add_inventory([&acme], carol, LocalTime::now().into())
- .unwrap();
- eve.config.peers = node::config::PeerConfig::Static;
-
- let mut eve = eve.spawn();
-
- alice.handle.seed(acme, Scope::All).unwrap();
- bob.handle.seed(acme, Scope::All).unwrap();
-
- bob.connect(&alice).converge([&alice]);
- eve.connect(&alice);
- eve.connect(&bob);
- eve.routes_to(&[(acme, carol), (acme, bob.id), (acme, alice.id)]);
- bob.storage.repository(acme).unwrap().remove().unwrap(); // Cause the fetch from Bob to fail.
- bob.storage.temporary_repository(acme).ok(); // Prevent repo from being re-fetched.
-
- test(
- "examples/rad-clone-partial-fail.md",
- environment.work(&eve),
- Some(&eve.home),
- [],
- )
- .unwrap();
-}
-
-#[test]
-fn rad_clone_connect() {
- let mut environment = Environment::new();
- let working = environment.tempdir().join("working");
- let alice = environment.node("alice");
- let bob = environment.node("bob");
- let mut eve = environment.node("eve");
- let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
- let ua = UserAgent::default();
- let now = LocalTime::now().into();
-
- fixtures::repository(working.join("acme"));
-
- test(
- "examples/rad-init.md",
- working.join("acme"),
- Some(&alice.home),
- [],
- )
- .unwrap();
-
- let mut alice = alice.spawn();
- let mut bob = bob.spawn();
-
- // Let Eve know about Alice and Bob having the repo.
- eve.db
- .addresses_mut()
- .insert(
- &alice.id,
- PROTOCOL_VERSION,
- node::Features::SEED,
- &Alias::new("alice"),
- 0,
- &ua,
- now,
- [node::KnownAddress::new(
- node::Address::from(alice.addr),
- node::address::Source::Imported,
- )],
- )
- .unwrap();
- eve.db
- .addresses_mut()
- .insert(
- &bob.id,
- PROTOCOL_VERSION,
- node::Features::SEED,
- &Alias::new("bob"),
- 0,
- &ua,
- now,
- [node::KnownAddress::new(
- node::Address::from(bob.addr),
- node::address::Source::Imported,
- )],
- )
- .unwrap();
- eve.db
- .routing_mut()
- .add_inventory([&acme], alice.id, now)
- .unwrap();
- eve.db
- .routing_mut()
- .add_inventory([&acme], bob.id, now)
- .unwrap();
- eve.config.peers = node::config::PeerConfig::Static;
-
- let eve = eve.spawn();
-
- alice.handle.seed(acme, Scope::Followed).unwrap();
- bob.handle.seed(acme, Scope::Followed).unwrap();
- alice.connect(&bob);
- bob.routes_to(&[(acme, alice.id)]);
- eve.routes_to(&[(acme, alice.id), (acme, bob.id)]);
- alice.routes_to(&[(acme, alice.id), (acme, bob.id)]);
-
- test(
- "examples/rad-clone-connect.md",
- working.join("acme"),
- Some(&eve.home),
- [],
- )
- .unwrap();
-}
-
#[test]
fn rad_sync_without_node() {
let mut environment = Environment::new();
@@ -1534,23 +1290,6 @@ fn rad_self() {
test("examples/rad-self.md", working, Some(&alice.home), []).unwrap();
}
-#[test]
-fn rad_clone_unknown() {
- let mut environment = Environment::new();
- let alice = environment.node("alice");
- let working = environment.tempdir().join("working");
-
- let alice = alice.spawn();
-
- test(
- "examples/rad-clone-unknown.md",
- working,
- Some(&alice.home),
- [],
- )
- .unwrap();
-}
-
#[test]
fn rad_init_sync_not_connected() {
let mut environment = Environment::new();
@@ -1724,28 +1463,6 @@ fn rad_diff() {
test("examples/rad-diff.md", tmp, None, []).unwrap();
}
-#[test]
-// User tries to clone; no seeds are available, but user has the repo locally.
-fn test_clone_without_seeds() {
- let mut environment = Environment::new();
- let mut alice = environment.node("alice");
- let working = environment.tempdir().join("working");
- let rid = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
- let mut alice = alice.spawn();
- let seeds = alice.handle.seeds_for(rid, [alice.id]).unwrap();
- let connected = seeds.connected().collect::<Vec<_>>();
-
- assert!(connected.is_empty());
-
- alice
- .rad("clone", &[rid.to_string().as_str()], working.as_path())
- .unwrap();
-
- alice
- .rad("inspect", &[], working.join("heartwood").as_path())
- .unwrap();
-}
-
#[test]
fn test_cob_replication() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/clone.rs b/crates/radicle-cli/tests/commands/clone.rs
new file mode 100644
index 0000000000..e6b6969527
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/clone.rs
@@ -0,0 +1,297 @@
+use crate::test;
+use crate::util::environment::Environment;
+use radicle::node;
+use radicle::node::address::Store as _;
+use radicle::node::policy::Scope;
+use radicle::node::routing::Store as _;
+use radicle::node::UserAgent;
+use radicle::node::{Alias, Handle as _};
+use radicle::prelude::{NodeId, RepoId};
+use radicle::storage::ReadStorage as _;
+use radicle_localtime::LocalTime;
+use radicle_node::PROTOCOL_VERSION;
+use std::net;
+use std::str::FromStr;
+
+#[test]
+fn rad_clone() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let working = environment.tempdir().join("working");
+
+ // Setup a test project.
+ let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ // Prevent Alice from fetching Bob's fork, as we're not testing that and it may cause errors.
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+
+ test("examples/rad-clone.md", working, Some(&bob.home), []).unwrap();
+}
+
+#[test]
+fn rad_clone_bare() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let working = environment.tempdir().join("working");
+
+ // Setup a test project.
+ let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ // Prevent Alice from fetching Bob's fork, as we're not testing that and it may cause errors.
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+
+ test("examples/rad-clone-bare.md", working, Some(&bob.home), []).unwrap();
+}
+
+#[test]
+fn rad_clone_directory() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let working = environment.tempdir().join("working");
+
+ // Setup a test project.
+ let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ // Prevent Alice from fetching Bob's fork, as we're not testing that and it may cause errors.
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+
+ test(
+ "examples/rad-clone-directory.md",
+ working,
+ Some(&bob.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_clone_all() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let eve = environment.node("eve");
+
+ // Setup a test project.
+ let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+ let mut eve = eve.spawn();
+
+ alice.handle.seed(acme, Scope::All).unwrap();
+ bob.connect(&alice).converge([&alice]);
+ eve.connect(&alice).converge([&alice]);
+
+ // Fork and sync repo.
+ bob.fork(acme, bob.home.path()).unwrap();
+ bob.announce(acme, 2, bob.home.path()).unwrap();
+ bob.has_remote_of(&acme, &alice.id);
+ alice.has_remote_of(&acme, &bob.id);
+
+ test(
+ "examples/rad-clone-all.md",
+ environment.work(&eve),
+ Some(&eve.home),
+ [],
+ )
+ .unwrap();
+ eve.has_remote_of(&acme, &bob.id);
+}
+
+#[test]
+fn rad_clone_partial_fail() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let mut eve = environment.node("eve");
+ let carol = NodeId::from_str("z6MksFqXN3Yhqk8pTJdUGLwBTkRfQvwZXPqR2qMEhbS9wzpT").unwrap();
+
+ // Setup a test project.
+ let acme = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ // Make Even think she knows about a seed called "carol" that has the repo.
+ eve.db
+ .addresses_mut()
+ .insert(
+ &carol,
+ PROTOCOL_VERSION,
+ node::Features::SEED,
+ &Alias::new("carol"),
+ 0,
+ &UserAgent::default(),
+ LocalTime::now().into(),
+ [node::KnownAddress::new(
+ // Eve will fail to connect to this address.
+ node::Address::from(net::SocketAddr::from(([0, 0, 0, 0], 19873))),
+ node::address::Source::Imported,
+ )],
+ )
+ .unwrap();
+ eve.db
+ .routing_mut()
+ .add_inventory([&acme], carol, LocalTime::now().into())
+ .unwrap();
+ eve.config.peers = node::config::PeerConfig::Static;
+
+ let mut eve = eve.spawn();
+
+ alice.handle.seed(acme, Scope::All).unwrap();
+ bob.handle.seed(acme, Scope::All).unwrap();
+
+ bob.connect(&alice).converge([&alice]);
+ eve.connect(&alice);
+ eve.connect(&bob);
+ eve.routes_to(&[(acme, carol), (acme, bob.id), (acme, alice.id)]);
+ bob.storage.repository(acme).unwrap().remove().unwrap(); // Cause the fetch from Bob to fail.
+ bob.storage.temporary_repository(acme).ok(); // Prevent repo from being re-fetched.
+
+ test(
+ "examples/rad-clone-partial-fail.md",
+ environment.work(&eve),
+ Some(&eve.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_clone_connect() {
+ let mut environment = Environment::new();
+ let working = environment.tempdir().join("working");
+ let alice = environment.node("alice");
+ let bob = environment.node("bob");
+ let mut eve = environment.node("eve");
+ let acme = RepoId::from_str("z42hL2jL4XNk6K8oHQaSWfMgCL7ji").unwrap();
+ let ua = UserAgent::default();
+ let now = LocalTime::now().into();
+
+ radicle::test::fixtures::repository(working.join("acme"));
+
+ test(
+ "examples/rad-init.md",
+ working.join("acme"),
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+
+ let mut alice = alice.spawn();
+ let mut bob = bob.spawn();
+
+ // Let Eve know about Alice and Bob having the repo.
+ eve.db
+ .addresses_mut()
+ .insert(
+ &alice.id,
+ PROTOCOL_VERSION,
+ node::Features::SEED,
+ &Alias::new("alice"),
+ 0,
+ &ua,
+ now,
+ [node::KnownAddress::new(
+ node::Address::from(alice.addr),
+ node::address::Source::Imported,
+ )],
+ )
+ .unwrap();
+ eve.db
+ .addresses_mut()
+ .insert(
+ &bob.id,
+ PROTOCOL_VERSION,
+ node::Features::SEED,
+ &Alias::new("bob"),
+ 0,
+ &ua,
+ now,
+ [node::KnownAddress::new(
+ node::Address::from(bob.addr),
+ node::address::Source::Imported,
+ )],
+ )
+ .unwrap();
+ eve.db
+ .routing_mut()
+ .add_inventory([&acme], alice.id, now)
+ .unwrap();
+ eve.db
+ .routing_mut()
+ .add_inventory([&acme], bob.id, now)
+ .unwrap();
+ eve.config.peers = node::config::PeerConfig::Static;
+
+ let eve = eve.spawn();
+
+ alice.handle.seed(acme, Scope::Followed).unwrap();
+ bob.handle.seed(acme, Scope::Followed).unwrap();
+ alice.connect(&bob);
+ bob.routes_to(&[(acme, alice.id)]);
+ eve.routes_to(&[(acme, alice.id), (acme, bob.id)]);
+ alice.routes_to(&[(acme, alice.id), (acme, bob.id)]);
+
+ test(
+ "examples/rad-clone-connect.md",
+ working.join("acme"),
+ Some(&eve.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+fn rad_clone_unknown() {
+ let mut environment = Environment::new();
+ let alice = environment.node("alice");
+ let working = environment.tempdir().join("working");
+
+ let alice = alice.spawn();
+
+ test(
+ "examples/rad-clone-unknown.md",
+ working,
+ Some(&alice.home),
+ [],
+ )
+ .unwrap();
+}
+
+#[test]
+// User tries to clone; no seeds are available, but user has the repo locally.
+fn test_clone_without_seeds() {
+ let mut environment = Environment::new();
+ let mut alice = environment.node("alice");
+ let working = environment.tempdir().join("working");
+ let rid = alice.project("heartwood", "Radicle Heartwood Protocol & Stack");
+ let mut alice = alice.spawn();
+ let seeds = alice.handle.seeds_for(rid, [alice.id]).unwrap();
+ let connected = seeds.connected().collect::<Vec<_>>();
+
+ assert!(connected.is_empty());
+
+ alice
+ .rad("clone", &[rid.to_string().as_str()], working.as_path())
+ .unwrap();
+
+ alice
+ .rad("inspect", &[], working.join("heartwood").as_path())
+ .unwrap();
+}
commit 6fb97593474551c0377cd7807a52f9999ee55cdf
Author: Fintan Halpenny <fintan.halpenny@gmail.com>
Date: Mon Mar 9 16:29:34 2026 +0000
cli/tests: Refactor checkout command tests
diff --git a/crates/radicle-cli/tests/commands.rs b/crates/radicle-cli/tests/commands.rs
index 8455d98ff1..2f0155be4b 100644
--- a/crates/radicle-cli/tests/commands.rs
+++ b/crates/radicle-cli/tests/commands.rs
@@ -30,6 +30,10 @@ mod util;
use util::environment::{config, Environment};
use util::formula::formula;
+mod commands {
+ mod checkout;
+}
+
/// Run a CLI test file.
pub(crate) fn test<'a>(
test: impl AsRef<Path>,
@@ -357,42 +361,6 @@ fn rad_warn_old_nodes() {
Environment::alice(["rad-warn-old-nodes"]);
}
-#[test]
-fn rad_checkout() {
- let mut environment = Environment::new();
- let profile = environment.profile("alice");
- let copy = tempfile::tempdir().unwrap();
-
- environment.repository(&profile);
-
- environment.test("rad-init", &profile).unwrap();
- test(
- "examples/rad-checkout.md",
- copy.path(),
- Some(&profile.home),
- [],
- )
- .unwrap();
-
- if cfg!(target_os = "linux") {
- test(
- "examples/rad-checkout-repo-config-linux.md",
- copy.path(),
- Some(&profile.home),
- [],
- )
- .unwrap();
- } else if cfg!(target_os = "macos") {
- test(
- "examples/rad-checkout-repo-config-macos.md",
- copy.path(),
- Some(&profile.home),
- [],
- )
- .unwrap();
- }
-}
-
#[test]
fn rad_id() {
let mut environment = Environment::new();
diff --git a/crates/radicle-cli/tests/commands/checkout.rs b/crates/radicle-cli/tests/commands/checkout.rs
new file mode 100644
index 0000000000..96b1c918a4
--- /dev/null
+++ b/crates/radicle-cli/tests/commands/checkout.rs
@@ -0,0 +1,38 @@
+use crate::test;
+use crate::util::environment::Environment;
+
+#[test]
+fn rad_checkout() {
+ let mut environment = Environment::new();
+ let profile = environment.profile("alice");
+ let copy = tempfile::tempdir().unwrap();
+
+ environment.repository(&profile);
+
+ environment.test("rad-init", &profile).unwrap();
+ test(
+ "examples/rad-checkout.md",
+ copy.path(),
+ Some(&profile.home),
+ [],
+ )
+ .unwrap();
+
+ if cfg!(target_os = "linux") {
+ test(
+ "examples/rad-checkout-repo-config-linux.md",
+ copy.path(),
+ Some(&profile.home),
+ [],
+ )
+ .unwrap();
+ } else if cfg!(target_os = "macos") {
+ test(
+ "examples/rad-checkout-repo-config-macos.md",
+ copy.path(),
+ Some(&profile.home),
+ [],
+ )
+ .unwrap();
+ }
+}
Exit code: 0
shell: 'export RUSTDOCFLAGS=''-D warnings'' cargo --version rustc --version cargo fmt --check cargo clippy --all-targets --workspace -- --deny warnings cargo build --all-targets --workspace cargo doc --workspace --no-deps --all-features cargo test --workspace --no-fail-fast '
Commands:
$ podman run --name 5e32c98e-8955-4a77-b777-3b4fcca64a04 -v /opt/radcis/ci.rad.levitte.org/cci/state/5e32c98e-8955-4a77-b777-3b4fcca64a04/s:/5e32c98e-8955-4a77-b777-3b4fcca64a04/s:ro -v /opt/radcis/ci.rad.levitte.org/cci/state/5e32c98e-8955-4a77-b777-3b4fcca64a04/w:/5e32c98e-8955-4a77-b777-3b4fcca64a04/w -w /5e32c98e-8955-4a77-b777-3b4fcca64a04/w -v /opt/radcis/ci.rad.levitte.org/.radicle:/${id}/.radicle:ro -e RAD_HOME=/${id}/.radicle rust:trixie bash /5e32c98e-8955-4a77-b777-3b4fcca64a04/s/script.sh
+ export 'RUSTDOCFLAGS=-D warnings'
+ RUSTDOCFLAGS='-D warnings'
+ cargo --version
info: syncing channel updates for '1.90-x86_64-unknown-linux-gnu'
info: latest update on 2025-09-18, rust version 1.90.0 (1159e78c4 2025-09-14)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-src'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
cargo 1.90.0 (840b83a10 2025-07-30)
+ rustc --version
rustc 1.90.0 (1159e78c4 2025-09-14)
+ cargo fmt --check
+ cargo clippy --all-targets --workspace -- --deny warnings
Updating crates.io index
Downloading crates ...
Downloaded aead v0.5.2
Downloaded adler2 v2.0.0
Downloaded fxhash v0.2.1
Downloaded ff v0.13.0
Downloaded ct-codecs v1.1.1
Downloaded ascii v1.1.0
Downloaded bit-vec v0.8.0
Downloaded form_urlencoded v1.2.1
Downloaded gix-features v0.46.1
Downloaded gix-credentials v0.36.0
Downloaded gix-path v0.11.1
Downloaded dyn-clone v1.0.17
Downloaded gix-chunk v0.6.0
Downloaded escargot v0.5.10
Downloaded gix-config-value v0.17.1
Downloaded gix-error v0.0.0
Downloaded errno v0.3.13
Downloaded fastrand v2.3.0
Downloaded multibase v0.9.1
Downloaded heck v0.5.0
Downloaded normalize-line-endings v0.3.0
Downloaded gix-utils v0.3.1
Downloaded noise-framework v0.4.0
Downloaded gix-glob v0.24.0
Downloaded outref v0.5.2
Downloaded litrs v0.4.1
Downloaded opaque-debug v0.3.1
Downloaded keccak v0.1.6
Downloaded percent-encoding v2.3.1
Downloaded itoa v1.0.17
Downloaded phf_shared v0.11.3
Downloaded proc-macro-error-attr2 v2.0.0
Downloaded once_cell v1.21.3
Downloaded pkg-config v0.3.30
Downloaded radicle-git-ext v0.12.0
Downloaded ref-cast-impl v1.0.24
Downloaded ref-cast v1.0.24
Downloaded rand_chacha v0.9.0
Downloaded p256 v0.13.2
Downloaded scrypt v0.11.0
Downloaded shell-words v1.1.0
Downloaded same-file v1.0.6
Downloaded mio v1.0.4
Downloaded socks5-client v0.4.1
Downloaded sec1 v0.7.3
Downloaded shlex v1.3.0
Downloaded serde-untagged v0.1.7
Downloaded subtle v2.5.0
Downloaded gix-url v0.35.1
Downloaded gix-trace v0.1.18
Downloaded gix-fs v0.19.1
Downloaded gix-date v0.13.0
Downloaded gix-commitgraph v0.33.0
Downloaded icu_locid_transform v1.5.0
Downloaded stable_deref_trait v1.2.0
Downloaded ssh-cipher v0.2.0
Downloaded signature v2.2.0
Downloaded tinyvec_macros v0.1.1
Downloaded test-log-macros v0.2.19
Downloaded test-log v0.2.19
Downloaded systemd-journal-logger v2.2.2
Downloaded timeago v0.4.2
Downloaded toml_datetime v0.7.5+spec-1.1.0
Downloaded tree-sitter-highlight v0.24.4
Downloaded tempfile v3.25.0
Downloaded typeid v1.0.3
Downloaded tinyvec v1.6.0
Downloaded utf8parse v0.2.2
Downloaded sval_json v2.14.1
Downloaded schemars v1.0.4
Downloaded xattr v1.3.1
Downloaded zerofrom-derive v0.1.6
Downloaded yansi v0.5.1
Downloaded value-bag v1.11.1
Downloaded vsimd v0.8.0
Downloaded yoke v0.7.5
Downloaded sval_nested v2.14.1
Downloaded zerovec-derive v0.10.3
Downloaded uuid v1.20.0
Downloaded toml_writer v1.0.6+spec-1.1.0
Downloaded gix-object v0.55.0
Downloaded ryu v1.0.17
Downloaded unit-prefix v0.5.1
Downloaded unicode-width v0.1.11
Downloaded zeroize v1.7.0
Downloaded icu_provider v1.5.0
Downloaded proptest v1.9.0
Downloaded parking_lot v0.12.5
Downloaded unicode-segmentation v1.11.0
Downloaded unicode-normalization v0.1.23
Downloaded icu_normalizer_data v1.5.1
Downloaded tree-sitter v0.24.4
Downloaded sysinfo v0.37.2
Downloaded rsa v0.9.6
Downloaded winnow v0.7.14
Downloaded zlib-rs v0.6.0
Downloaded libm v0.2.8
Downloaded inquire v0.7.5
Downloaded rustix v0.38.34
Downloaded jsonschema v0.30.0
Downloaded zerovec v0.10.4
Downloaded hashbrown v0.14.3
Downloaded zerocopy v0.7.35
Downloaded tree-sitter-python v0.23.4
Downloaded tree-sitter-bash v0.23.3
Downloaded icu_properties_data v1.5.1
Downloaded vcpkg v0.2.15
Downloaded syn v1.0.109
Downloaded gimli v0.32.3
Downloaded unicode-width v0.2.1
Downloaded syn v2.0.106
Downloaded regex-automata v0.4.9
Downloaded tree-sitter-md v0.3.2
Downloaded regex-syntax v0.8.5
Downloaded object v0.37.3
Downloaded tracing v0.1.44
Downloaded git2 v0.20.4
Downloaded tree-sitter-rust v0.23.2
Downloaded rustix v1.1.3
Downloaded itertools v0.14.0
Downloaded idna v1.0.3
Downloaded tree-sitter-ruby v0.23.1
Downloaded hashbrown v0.16.1
Downloaded sha3 v0.10.8
Downloaded tree-sitter-css v0.23.1
Downloaded tree-sitter-c v0.23.2
Downloaded tracing-subscriber v0.3.22
Downloaded tokio v1.47.1
Downloaded tree-sitter-typescript v0.23.2
Downloaded gix-transport v0.54.0
Downloaded regex v1.11.1
Downloaded jiff v0.2.20
Downloaded indicatif v0.18.0
Downloaded indexmap v2.2.6
Downloaded jiff-static v0.2.20
Downloaded sha1-checked v0.10.0
Downloaded icu_properties v1.5.1
Downloaded libc v0.2.182
Downloaded icu_collections v1.5.0
Downloaded signals_receipts v0.2.0
Downloaded signal-hook v0.3.18
Downloaded serde_core v1.0.228
Downloaded heapless v0.8.0
Downloaded gix-ref v0.59.0
Downloaded gix-diff v0.58.0
Downloaded num-traits v0.2.19
Downloaded gix-protocol v0.57.0
Downloaded icu_normalizer v1.5.0
Downloaded getrandom v0.3.3
Downloaded url v2.5.4
Downloaded tree-sitter-go v0.23.4
Downloaded p384 v0.13.0
Downloaded serde_json v1.0.140
Downloaded parking_lot_core v0.9.12
Downloaded linux-raw-sys v0.4.13
Downloaded getrandom v0.2.15
Downloaded hmac v0.12.1
Downloaded gix-revwalk v0.26.0
Downloaded unicode-ident v1.0.12
Downloaded typenum v1.17.0
Downloaded nu-ansi-term v0.50.3
Downloaded log v0.4.27
Downloaded ssh-key v0.6.6
Downloaded writeable v0.5.5
Downloaded walkdir v2.5.0
Downloaded spki v0.7.3
Downloaded serde_spanned v1.0.4
Downloaded portable-atomic v1.11.0
Downloaded zerofrom v0.1.6
Downloaded yoke-derive v0.7.5
Downloaded write16 v1.0.0
Downloaded wait-timeout v0.2.1
Downloaded version_check v0.9.4
Downloaded universal-hash v0.5.1
Downloaded tree-sitter-toml-ng v0.6.0
Downloaded radicle-surf v0.27.0
Downloaded gix-date v0.14.0
Downloaded chrono v0.4.38
Downloaded value-bag-sval2 v1.11.1
Downloaded value-bag-serde1 v1.11.1
Downloaded uuid-simd v0.8.0
Downloaded utf16_iter v1.0.5
Downloaded unicode-display-width v0.3.0
Downloaded tree-sitter-language v0.1.2
Downloaded tree-sitter-json v0.24.8
Downloaded tracing-core v0.1.36
Downloaded toml v0.9.12+spec-1.1.0
Downloaded tar v0.4.40
Downloaded polyval v0.6.2
Downloaded icu_locid_transform_data v1.5.1
Downloaded icu_locid v1.5.0
Downloaded gix-odb v0.75.0
Downloaded libgit2-sys v0.18.3+1.9.2
Downloaded clap_builder v4.5.44
Downloaded paste v1.0.15
Downloaded p521 v0.13.3
Downloaded num-rational v0.4.2
Downloaded iana-time-zone v0.1.60
Downloaded sval_fmt v2.14.1
Downloaded bloomy v1.2.0
Downloaded utf8_iter v1.0.4
Downloaded unarray v0.1.4
Downloaded tree-sitter-html v0.23.2
Downloaded thiserror-impl v2.0.18
Downloaded litemap v0.7.5
Downloaded tracing-log v0.2.0
Downloaded serde v1.0.228
Downloaded gix-revwalk v0.27.0
Downloaded jobserver v0.1.31
Downloaded gix-refspec v0.37.0
Downloaded tinystr v0.7.6
Downloaded thread_local v1.1.9
Downloaded thiserror v2.0.18
Downloaded rand v0.9.2
Downloaded linux-raw-sys v0.11.0
Downloaded human-panic v2.0.6
Downloaded gix-revision v0.41.0
Downloaded thiserror-impl v1.0.69
Downloaded thiserror v1.0.69
Downloaded sval_dynamic v2.14.1
Downloaded sval v2.14.1
Downloaded sqlite3-sys v0.15.2
Downloaded sqlite v0.32.0
Downloaded sqlite3-src v0.5.1
Downloaded spin v0.9.8
Downloaded socket2 v0.5.7
Downloaded similar v2.5.0
Downloaded lexopt v0.3.0
Downloaded synstructure v0.13.1
Downloaded structured-logger v1.0.4
Downloaded streaming-iterator v0.1.9
Downloaded snapbox v0.4.17
Downloaded smallvec v1.15.1
Downloaded sharded-slab v0.1.7
Downloaded sha1 v0.10.6
Downloaded serde_derive v1.0.228
Downloaded rfc6979 v0.4.0
Downloaded rand v0.8.5
Downloaded radicle-std-ext v0.2.0
Downloaded quick-error v1.2.3
Downloaded qcheck-macros v1.0.0
Downloaded prodash v31.0.0
Downloaded pretty_assertions v1.4.0
Downloaded num-bigint-dig v0.8.4
Downloaded num-bigint v0.4.6
Downloaded group v0.13.0
Downloaded gix-tempfile v21.0.1
Downloaded gix-pack v0.65.0
Downloaded gix-object v0.56.0
Downloaded gix-commitgraph v0.32.0
Downloaded cyphernet v0.5.2
Downloaded sval_serde v2.14.1
Downloaded sval_ref v2.14.1
Downloaded sval_buffer v2.14.1
Downloaded strsim v0.11.1
Downloaded ssh-encoding v0.2.0
Downloaded snapbox-macros v0.3.8
Downloaded salsa20 v0.10.2
Downloaded signal-hook-registry v1.4.5
Downloaded sha2 v0.10.8
Downloaded sem_safe v0.2.0
Downloaded referencing v0.30.0
Downloaded mio v0.8.11
Downloaded pbkdf2 v0.12.2
Downloaded gix-command v0.7.1
Downloaded emojis v0.6.4
Downloaded crossterm v0.29.0
Downloaded schemars_derive v1.0.4
Downloaded rusty-fork v0.3.1
Downloaded proc-macro2 v1.0.101
Downloaded cc v1.2.2
Downloaded siphasher v1.0.1
Downloaded siphasher v0.3.11
Downloaded signature v1.6.4
Downloaded signal-hook-mio v0.2.4
Downloaded serde_fmt v1.0.3
Downloaded serde_derive_internals v0.29.1
Downloaded scopeguard v1.2.0
Downloaded rustversion v1.0.20
Downloaded rustc-demangle v0.1.26
Downloaded num-cmp v0.1.0
Downloaded num v0.4.3
Downloaded is_terminal_polyfill v1.70.2
Downloaded inout v0.1.3
Downloaded icu_provider_macros v1.5.0
Downloaded hash32 v0.3.1
Downloaded gix-validate v0.11.0
Downloaded gix-prompt v0.13.1
Downloaded git-ref-format-macro v0.6.0
Downloaded rand_core v0.9.3
Downloaded rand_core v0.6.4
Downloaded qcheck v1.0.0
Downloaded idna_adapter v1.2.0
Downloaded crossbeam-channel v0.5.15
Downloaded memchr v2.7.2
Downloaded rand_chacha v0.3.1
Downloaded quote v1.0.41
Downloaded proc-macro-error2 v2.0.1
Downloaded ppv-lite86 v0.2.17
Downloaded poly1305 v0.8.0
Downloaded pkcs1 v0.7.5
Downloaded gix-sec v0.13.1
Downloaded derive_more-impl v2.0.1
Downloaded rand_xorshift v0.4.0
Downloaded pin-project-lite v0.2.16
Downloaded pem-rfc7468 v0.7.0
Downloaded der v0.7.9
Downloaded primeorder v0.13.6
Downloaded pkcs8 v0.10.2
Downloaded miniz_oxide v0.8.8
Downloaded chacha20poly1305 v0.10.1
Downloaded phf v0.11.3
Downloaded fraction v0.15.3
Downloaded libz-sys v1.1.16
Downloaded fluent-uri v0.3.2
Downloaded gix-traverse v0.52.0
Downloaded gix-packetline v0.21.1
Downloaded gix-hash v0.22.1
Downloaded gix-error v0.1.0
Downloaded base64 v0.21.7
Downloaded num-integer v0.1.46
Downloaded num-complex v0.4.6
Downloaded maybe-async v0.2.10
Downloaded derive_more v2.0.1
Downloaded clap v4.5.44
Downloaded arc-swap v1.8.2
Downloaded num-iter v0.1.45
Downloaded memmap2 v0.9.8
Downloaded gix-shallow v0.8.1
Downloaded fancy-regex v0.14.0
Downloaded diff v0.1.13
Downloaded crypto-bigint v0.5.5
Downloaded const-oid v0.9.6
Downloaded nonempty v0.9.0
Downloaded clap_complete v4.5.60
Downloaded clap_derive v4.5.41
Downloaded anstyle-parse v0.2.3
Downloaded lock_api v0.4.14
Downloaded lazy_static v1.5.0
Downloaded erased-serde v0.4.6
Downloaded email_address v0.2.9
Downloaded anstream v0.6.21
Downloaded git-ref-format-core v0.6.0
Downloaded git-ref-format v0.6.0
Downloaded either v1.11.0
Downloaded crossbeam-utils v0.8.19
Downloaded colored v2.1.0
Downloaded base16ct v0.2.0
Downloaded newline-converter v0.3.0
Downloaded matchers v0.2.0
Downloaded gix-negotiate v0.27.0
Downloaded ed25519 v1.5.3
Downloaded displaydoc v0.2.5
Downloaded console v0.16.0
Downloaded clap_lex v0.7.5
Downloaded base64ct v1.6.0
Downloaded anyhow v1.0.82
Downloaded gix-hashtable v0.12.0
Downloaded digest v0.10.7
Downloaded data-encoding v2.5.0
Downloaded ctr v0.9.2
Downloaded cipher v0.4.4
Downloaded blowfish v0.9.1
Downloaded gix-quote v0.6.2
Downloaded gix-lock v21.0.1
Downloaded ghash v0.5.1
Downloaded bitflags v1.3.2
Downloaded cyphergraphy v0.3.0
Downloaded cpufeatures v0.2.12
Downloaded colorchoice v1.0.0
Downloaded amplify_syn v2.0.1
Downloaded equivalent v1.0.1
Downloaded document-features v0.2.11
Downloaded data-encoding-macro v0.1.14
Downloaded cypheraddr v0.4.0
Downloaded chacha20 v0.9.1
Downloaded base64 v0.22.1
Downloaded base-x v0.2.11
Downloaded gix-actor v0.38.0
Downloaded fast-glob v0.3.3
Downloaded dunce v1.0.5
Downloaded data-encoding-macro-internal v0.1.12
Downloaded crypto-common v0.1.6
Downloaded base32 v0.4.0
Downloaded ecdsa v0.16.9
Downloaded bytesize v2.0.1
Downloaded bytes v1.11.1
Downloaded autocfg v1.2.0
Downloaded env_logger v0.11.8
Downloaded env_filter v0.1.3
Downloaded cfg-if v1.0.0
Downloaded bitflags v2.9.1
Downloaded bytecount v0.6.8
Downloaded bit-set v0.8.0
Downloaded backtrace v0.3.76
Downloaded anstyle-query v1.0.2
Downloaded gix-chunk v0.5.0
Downloaded gix-actor v0.39.0
Downloaded generic-array v0.14.7
Downloaded faster-hex v0.10.0
Downloaded ec25519 v0.1.0
Downloaded byteorder v1.5.0
Downloaded bstr v1.12.0
Downloaded borrow-or-share v0.2.2
Downloaded anstyle v1.0.13
Downloaded fnv v1.0.7
Downloaded flate2 v1.1.1
Downloaded crossterm v0.25.0
Downloaded convert_case v0.7.1
Downloaded bcrypt-pbkdf v0.10.0
Downloaded elliptic-curve v0.13.8
Downloaded amplify_num v0.5.2
Downloaded filetime v0.2.23
Downloaded crc32fast v1.5.0
Downloaded amplify_derive v4.0.0
Downloaded addr2line v0.25.1
Downloaded aes-gcm v0.10.3
Downloaded aho-corasick v1.1.3
Downloaded aes v0.8.4
Downloaded block-padding v0.3.3
Downloaded block-buffer v0.10.4
Downloaded amplify v4.6.0
Downloaded cbc v0.1.2
Downloaded ahash v0.8.11
Compiling libc v0.2.182
Compiling proc-macro2 v1.0.101
Compiling quote v1.0.41
Compiling unicode-ident v1.0.12
Checking cfg-if v1.0.0
Checking memchr v2.7.2
Compiling version_check v0.9.4
Compiling shlex v1.3.0
Compiling syn v2.0.106
Compiling typenum v1.17.0
Checking getrandom v0.2.15
Checking regex-syntax v0.8.5
Compiling jobserver v0.1.31
Compiling cc v1.2.2
Checking aho-corasick v1.1.3
Compiling generic-array v0.14.7
Checking regex-automata v0.4.9
Checking rand_core v0.6.4
Compiling serde_core v1.0.228
Checking crypto-common v0.1.6
Checking smallvec v1.15.1
Compiling serde v1.0.228
Checking subtle v2.5.0
Compiling thiserror v2.0.18
Checking cpufeatures v0.2.12
Checking stable_deref_trait v1.2.0
Checking fastrand v2.3.0
Compiling parking_lot_core v0.9.12
Checking scopeguard v1.2.0
Checking lock_api v0.4.14
Checking bstr v1.12.0
Checking block-buffer v0.10.4
Checking parking_lot v0.12.5
Checking digest v0.10.7
Checking tinyvec_macros v0.1.1
Checking byteorder v1.5.0
Checking tinyvec v1.6.0
Checking bitflags v2.9.1
Checking gix-trace v0.1.18
Compiling crc32fast v1.5.0
Checking gix-validate v0.11.0
Checking itoa v1.0.17
Compiling typeid v1.0.3
Checking same-file v1.0.6
Checking unicode-normalization v0.1.23
Checking walkdir v2.5.0
Checking prodash v31.0.0
Checking zlib-rs v0.6.0
Compiling serde_derive v1.0.228
Compiling thiserror-impl v2.0.18
Checking gix-utils v0.3.1
Compiling heapless v0.8.0
Checking hash32 v0.3.1
Compiling synstructure v0.13.1
Checking faster-hex v0.10.0
Compiling getrandom v0.3.3
Checking gix-path v0.11.1
Checking sha1 v0.10.6
Checking gix-features v0.46.1
Checking zeroize v1.7.0
Compiling zerofrom-derive v0.1.6
Compiling yoke-derive v0.7.5
Checking sha1-checked v0.10.0
Compiling pkg-config v0.3.30
Compiling rustix v1.1.3
Checking gix-hash v0.22.1
Compiling zerovec-derive v0.10.3
Checking linux-raw-sys v0.11.0
Checking zerofrom v0.1.6
Checking yoke v0.7.5
Compiling displaydoc v0.2.5
Checking erased-serde v0.4.6
Checking serde_fmt v1.0.3
Checking block-padding v0.3.3
Checking value-bag-serde1 v1.11.1
Checking zerovec v0.10.4
Checking once_cell v1.21.3
Checking value-bag v1.11.1
Checking inout v0.1.3
Compiling syn v1.0.109
Checking log v0.4.27
Checking cipher v0.4.4
Checking litemap v0.7.5
Compiling icu_locid_transform_data v1.5.1
Checking writeable v0.5.5
Checking tinystr v0.7.6
Compiling icu_provider_macros v1.5.0
Checking icu_locid v1.5.0
Compiling icu_properties_data v1.5.1
Checking percent-encoding v2.3.1
Checking icu_provider v1.5.0
Compiling icu_normalizer_data v1.5.1
Compiling thiserror v1.0.69
Checking icu_locid_transform v1.5.0
Checking icu_collections v1.5.0
Compiling thiserror-impl v1.0.69
Compiling serde_json v1.0.140
Checking equivalent v1.0.1
Checking hashbrown v0.14.3
Checking icu_properties v1.5.1
Checking indexmap v2.2.6
Checking sha2 v0.10.8
Compiling vcpkg v0.2.15
Checking utf8_iter v1.0.4
Checking write16 v1.0.0
Checking ryu v1.0.17
Checking utf16_iter v1.0.5
Compiling ref-cast v1.0.24
Compiling libz-sys v1.1.16
Checking icu_normalizer v1.5.0
Checking tempfile v3.25.0
Compiling ref-cast-impl v1.0.24
Checking universal-hash v0.5.1
Checking opaque-debug v0.3.1
Checking idna_adapter v1.2.0
Compiling autocfg v1.2.0
Checking dyn-clone v1.0.17
Checking idna v1.0.3
Compiling amplify_syn v2.0.1
Compiling libgit2-sys v0.18.3+1.9.2
Compiling num-traits v0.2.19
Checking signature v1.6.4
Checking ed25519 v1.5.3
Checking form_urlencoded v1.2.1
Compiling serde_derive_internals v0.29.1
Checking aead v0.5.2
Checking amplify_num v0.5.2
Compiling amplify_derive v4.0.0
Checking ascii v1.1.0
Checking ct-codecs v1.1.1
Checking ec25519 v0.1.0
Compiling schemars_derive v1.0.4
Checking url v2.5.4
Checking amplify v4.6.0
Checking git-ref-format-core v0.6.0
Checking poly1305 v0.8.0
Checking chacha20 v0.9.1
Checking cyphergraphy v0.3.0
Checking polyval v0.6.2
Checking schemars v1.0.4
Compiling sqlite3-src v0.5.1
Checking hmac v0.12.1
Checking keccak v0.1.6
Checking base64ct v1.6.0
Checking sha3 v0.10.8
Checking pem-rfc7468 v0.7.0
Checking pbkdf2 v0.12.2
Checking ghash v0.5.1
Checking ctr v0.9.2
Checking aes v0.8.4
Checking rand v0.8.5
Compiling data-encoding v2.5.0
Checking base32 v0.4.0
Checking cypheraddr v0.4.0
Checking qcheck v1.0.0
Compiling data-encoding-macro-internal v0.1.12
Checking aes-gcm v0.10.3
Checking ssh-encoding v0.2.0
Checking chacha20poly1305 v0.10.1
Checking blowfish v0.9.1
Checking cbc v0.1.2
Checking jiff v0.2.20
Checking data-encoding-macro v0.1.14
Checking bcrypt-pbkdf v0.10.0
Checking ssh-cipher v0.2.0
Checking noise-framework v0.4.0
Checking socks5-client v0.4.1
Checking signature v2.2.0
Checking base-x v0.2.11
Compiling crossbeam-utils v0.8.19
Checking multibase v0.9.1
Checking ssh-key v0.6.6
Checking cyphernet v0.5.2
Checking radicle-ssh v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-ssh)
Checking winnow v0.7.14
Checking crossbeam-channel v0.5.15
Checking lazy_static v1.5.0
Checking hashbrown v0.16.1
Checking gix-hashtable v0.12.0
Checking nonempty v0.9.0
Checking anstyle-query v1.0.2
Checking siphasher v1.0.1
Checking radicle-git-metadata v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-metadata)
Checking gix-error v0.1.0
Checking radicle-dag v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-dag)
Checking memmap2 v0.9.8
Checking utf8parse v0.2.2
Checking radicle-git-ref-format v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-ref-format)
Checking anstyle-parse v0.2.3
Checking is_terminal_polyfill v1.70.2
Checking iana-time-zone v0.1.60
Checking colorchoice v1.0.0
Checking base64 v0.21.7
Checking anstyle v1.0.13
Checking anstream v0.6.21
Checking chrono v0.4.38
Checking colored v2.1.0
Checking radicle-localtime v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-localtime)
Checking serde-untagged v0.1.7
Checking bytesize v2.0.1
Checking gix-error v0.0.0
Checking fast-glob v0.3.3
Checking dunce v1.0.5
Checking tree-sitter-language v0.1.2
Checking gix-date v0.14.0
Checking gix-date v0.13.0
Checking gix-actor v0.39.0
Checking gix-fs v0.19.1
Checking gix-object v0.56.0
Checking gix-tempfile v21.0.1
Checking gix-actor v0.38.0
Checking gix-chunk v0.6.0
Checking mio v1.0.4
Checking gix-quote v0.6.2
Checking gix-commitgraph v0.33.0
Checking gix-object v0.55.0
Checking gix-chunk v0.5.0
Checking sem_safe v0.2.0
Checking errno v0.3.13
Checking either v1.11.0
Checking shell-words v1.1.0
Checking gix-command v0.7.1
Checking signals_receipts v0.2.0
Checking gix-commitgraph v0.32.0
Checking gix-revwalk v0.27.0
Compiling object v0.37.3
Compiling rustversion v1.0.20
Compiling signal-hook v0.3.18
Checking gix-revwalk v0.26.0
Checking gix-lock v21.0.1
Checking gix-url v0.35.1
Checking gix-config-value v0.17.1
Checking gix-sec v0.13.1
Checking signal-hook-registry v1.4.5
Checking adler2 v2.0.0
Compiling rustix v0.38.34
Checking gimli v0.32.3
Checking miniz_oxide v0.8.8
Checking gix-prompt v0.13.1
Checking gix-traverse v0.52.0
Checking addr2line v0.25.1
Checking gix-revision v0.41.0
Checking radicle-signals v0.11.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-signals)
Checking gix-diff v0.58.0
Checking mio v0.8.11
Checking gix-glob v0.24.0
Checking gix-packetline v0.21.1
Compiling tree-sitter v0.24.4
Compiling linux-raw-sys v0.4.13
Checking rustc-demangle v0.1.26
Compiling anyhow v1.0.82
Compiling unicode-segmentation v1.11.0
Compiling convert_case v0.7.1
Checking backtrace v0.3.76
Checking gix-transport v0.54.0
Checking gix-refspec v0.37.0
Checking signal-hook-mio v0.2.4
Checking gix-pack v0.65.0
Checking arc-swap v1.8.2
Checking gix-credentials v0.36.0
Checking gix-ref v0.59.0
Checking gix-shallow v0.8.1
Checking gix-negotiate v0.27.0
Compiling maybe-async v0.2.10
Checking regex v1.11.1
Compiling proc-macro-error-attr2 v2.0.0
Compiling portable-atomic v1.11.0
Compiling proc-macro-error2 v2.0.1
Checking gix-protocol v0.57.0
Checking gix-odb v0.75.0
Compiling xattr v1.3.1
Compiling derive_more-impl v2.0.1
Compiling filetime v0.2.23
Checking uuid v1.20.0
Checking bitflags v1.3.2
Compiling litrs v0.4.1
Checking unicode-width v0.2.1
Checking bytes v1.11.1
Compiling document-features v0.2.11
Checking console v0.16.0
Checking crossterm v0.25.0
Compiling tar v0.4.40
Checking sqlite3-sys v0.15.2
Checking sqlite v0.32.0
Checking derive_more v2.0.1
Checking radicle-crypto v0.15.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-crypto)
Compiling flate2 v1.1.1
Compiling git-ref-format-macro v0.6.0
Checking newline-converter v0.3.0
Checking snapbox-macros v0.3.8
Checking salsa20 v0.10.2
Checking fxhash v0.2.1
Checking strsim v0.11.1
Checking siphasher v0.3.11
Checking unicode-width v0.1.11
Compiling heck v0.5.0
Checking similar v2.5.0
Checking streaming-iterator v0.1.9
Checking normalize-line-endings v0.3.0
Checking clap_lex v0.7.5
Checking unit-prefix v0.5.1
Checking clap_builder v4.5.44
Checking indicatif v0.18.0
Checking snapbox v0.4.17
Compiling clap_derive v4.5.41
Checking bloomy v1.2.0
Checking inquire v0.7.5
Checking scrypt v0.11.0
Compiling radicle-surf v0.27.0
Checking git-ref-format v0.6.0
Checking crossterm v0.29.0
Checking unicode-display-width v0.3.0
Checking systemd-journal-logger v2.2.2
Checking serde_spanned v1.0.4
Checking toml_datetime v0.7.5+spec-1.1.0
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-json v0.24.8
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-python v0.23.4
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-go v0.23.4
Checking radicle-std-ext v0.2.0
Checking pin-project-lite v0.2.16
Checking toml_writer v1.0.6+spec-1.1.0
Checking tokio v1.47.1
Checking toml v0.9.12+spec-1.1.0
Checking clap v4.5.44
Checking sysinfo v0.37.2
Checking yansi v0.5.1
Compiling radicle-node v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-node)
Compiling radicle-cli v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli)
Checking diff v0.1.13
Checking pretty_assertions v1.4.0
Checking human-panic v2.0.6
Checking clap_complete v4.5.60
Checking structured-logger v1.0.4
Checking radicle-systemd v0.12.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-systemd)
Checking tree-sitter-highlight v0.24.4
Checking itertools v0.14.0
Checking num-integer v0.1.46
Compiling qcheck-macros v1.0.0
Checking socket2 v0.5.7
Checking timeago v0.4.2
Checking lexopt v0.3.0
Compiling escargot v0.5.10
Checking bit-vec v0.8.0
Checking bit-set v0.8.0
Checking num-bigint v0.4.6
Checking rand_core v0.9.3
Compiling ahash v0.8.11
Checking num-iter v0.1.45
Checking num-complex v0.4.6
Checking env_filter v0.1.3
Checking zerocopy v0.7.35
Checking borrow-or-share v0.2.2
Checking fluent-uri v0.3.2
Checking num-rational v0.4.2
Checking env_logger v0.11.8
Checking phf_shared v0.11.3
Compiling test-log-macros v0.2.19
Checking num v0.4.3
Checking wait-timeout v0.2.1
Checking ppv-lite86 v0.2.17
Compiling paste v1.0.15
Checking quick-error v1.2.3
Checking vsimd v0.8.0
Checking fnv v1.0.7
Compiling radicle-remote-helper v0.14.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-remote-helper)
Checking outref v0.5.2
Checking rusty-fork v0.3.1
Checking rand_chacha v0.9.0
Checking uuid-simd v0.8.0
Checking test-log v0.2.19
Checking phf v0.11.3
Checking fraction v0.15.3
Checking referencing v0.30.0
Checking rand v0.9.2
Checking rand_xorshift v0.4.0
Checking fancy-regex v0.14.0
Checking email_address v0.2.9
Checking bytecount v0.6.8
Checking base64 v0.22.1
Checking num-cmp v0.1.0
Checking unarray v0.1.4
Checking emojis v0.6.4
Checking proptest v1.9.0
Checking jsonschema v0.30.0
Checking radicle-windows v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-windows)
Checking git2 v0.20.4
Checking radicle-oid v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-oid)
Checking radicle-git-ext v0.12.0
Checking radicle-term v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-term)
Checking radicle-cob v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cob)
Checking radicle-core v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-core)
Checking radicle v0.21.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle)
Checking radicle-fetch v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-fetch)
Checking radicle-cli-test v0.13.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli-test)
Checking radicle-schemars v0.6.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-schemars)
Checking radicle-protocol v0.5.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-protocol)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 48.05s
+ cargo build --all-targets --workspace
Compiling libc v0.2.182
Compiling cfg-if v1.0.0
Compiling memchr v2.7.2
Compiling shlex v1.3.0
Compiling regex-syntax v0.8.5
Compiling typenum v1.17.0
Compiling aho-corasick v1.1.3
Compiling generic-array v0.14.7
Compiling jobserver v0.1.31
Compiling cc v1.2.2
Compiling getrandom v0.2.15
Compiling rand_core v0.6.4
Compiling serde_core v1.0.228
Compiling regex-automata v0.4.9
Compiling crypto-common v0.1.6
Compiling smallvec v1.15.1
Compiling subtle v2.5.0
Compiling thiserror v2.0.18
Compiling fastrand v2.3.0
Compiling cpufeatures v0.2.12
Compiling serde v1.0.228
Compiling stable_deref_trait v1.2.0
Compiling scopeguard v1.2.0
Compiling parking_lot_core v0.9.12
Compiling lock_api v0.4.14
Compiling block-buffer v0.10.4
Compiling parking_lot v0.12.5
Compiling digest v0.10.7
Compiling bitflags v2.9.1
Compiling tinyvec_macros v0.1.1
Compiling byteorder v1.5.0
Compiling tinyvec v1.6.0
Compiling gix-trace v0.1.18
Compiling crc32fast v1.5.0
Compiling itoa v1.0.17
Compiling same-file v1.0.6
Compiling typeid v1.0.3
Compiling walkdir v2.5.0
Compiling prodash v31.0.0
Compiling unicode-normalization v0.1.23
Compiling zlib-rs v0.6.0
Compiling gix-utils v0.3.1
Compiling erased-serde v0.4.6
Compiling hash32 v0.3.1
Compiling bstr v1.12.0
Compiling serde_fmt v1.0.3
Compiling value-bag-serde1 v1.11.1
Compiling heapless v0.8.0
Compiling gix-validate v0.11.0
Compiling faster-hex v0.10.0
Compiling gix-path v0.11.1
Compiling value-bag v1.11.1
Compiling log v0.4.27
Compiling sha1 v0.10.6
Compiling zeroize v1.7.0
Compiling sha1-checked v0.10.0
Compiling zerofrom v0.1.6
Compiling getrandom v0.3.3
Compiling yoke v0.7.5
Compiling linux-raw-sys v0.11.0
Compiling zerovec v0.10.4
Compiling gix-features v0.46.1
Compiling gix-hash v0.22.1
Compiling block-padding v0.3.3
Compiling once_cell v1.21.3
Compiling inout v0.1.3
Compiling tinystr v0.7.6
Compiling cipher v0.4.4
Compiling writeable v0.5.5
Compiling rustix v1.1.3
Compiling litemap v0.7.5
Compiling percent-encoding v2.3.1
Compiling icu_locid_transform_data v1.5.1
Compiling icu_properties_data v1.5.1
Compiling icu_collections v1.5.0
Compiling icu_locid v1.5.0
Compiling equivalent v1.0.1
Compiling hashbrown v0.14.3
Compiling icu_provider v1.5.0
Compiling indexmap v2.2.6
Compiling icu_normalizer_data v1.5.1
Compiling icu_locid_transform v1.5.0
Compiling sha2 v0.10.8
Compiling utf8_iter v1.0.4
Compiling ryu v1.0.17
Compiling icu_properties v1.5.1
Compiling write16 v1.0.0
Compiling utf16_iter v1.0.5
Compiling serde_json v1.0.140
Compiling libz-sys v1.1.16
Compiling thiserror v1.0.69
Compiling universal-hash v0.5.1
Compiling opaque-debug v0.3.1
Compiling tempfile v3.25.0
Compiling ref-cast v1.0.24
Compiling icu_normalizer v1.5.0
Compiling dyn-clone v1.0.17
Compiling libgit2-sys v0.18.3+1.9.2
Compiling idna_adapter v1.2.0
Compiling idna v1.0.3
Compiling signature v1.6.4
Compiling ed25519 v1.5.3
Compiling form_urlencoded v1.2.1
Compiling aead v0.5.2
Compiling amplify_num v0.5.2
Compiling ct-codecs v1.1.1
Compiling ascii v1.1.0
Compiling ec25519 v0.1.0
Compiling url v2.5.4
Compiling amplify v4.6.0
Compiling num-traits v0.2.19
Compiling poly1305 v0.8.0
Compiling git-ref-format-core v0.6.0
Compiling chacha20 v0.9.1
Compiling cyphergraphy v0.3.0
Compiling schemars v1.0.4
Compiling polyval v0.6.2
Compiling sqlite3-src v0.5.1
Compiling hmac v0.12.1
Compiling keccak v0.1.6
Compiling base64ct v1.6.0
Compiling sha3 v0.10.8
Compiling pem-rfc7468 v0.7.0
Compiling pbkdf2 v0.12.2
Compiling ghash v0.5.1
Compiling aes v0.8.4
Compiling ctr v0.9.2
Compiling rand v0.8.5
Compiling base32 v0.4.0
Compiling cypheraddr v0.4.0
Compiling qcheck v1.0.0
Compiling aes-gcm v0.10.3
Compiling ssh-encoding v0.2.0
Compiling chacha20poly1305 v0.10.1
Compiling blowfish v0.9.1
Compiling cbc v0.1.2
Compiling data-encoding v2.5.0
Compiling jiff v0.2.20
Compiling data-encoding-macro v0.1.14
Compiling ssh-cipher v0.2.0
Compiling bcrypt-pbkdf v0.10.0
Compiling noise-framework v0.4.0
Compiling socks5-client v0.4.1
Compiling base-x v0.2.11
Compiling signature v2.2.0
Compiling ssh-key v0.6.6
Compiling multibase v0.9.1
Compiling cyphernet v0.5.2
Compiling radicle-ssh v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-ssh)
Compiling crossbeam-utils v0.8.19
Compiling winnow v0.7.14
Compiling crossbeam-channel v0.5.15
Compiling hashbrown v0.16.1
Compiling lazy_static v1.5.0
Compiling gix-hashtable v0.12.0
Compiling nonempty v0.9.0
Compiling anstyle-query v1.0.2
Compiling siphasher v1.0.1
Compiling gix-error v0.1.0
Compiling radicle-dag v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-dag)
Compiling radicle-git-metadata v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-metadata)
Compiling memmap2 v0.9.8
Compiling utf8parse v0.2.2
Compiling anstyle-parse v0.2.3
Compiling radicle-git-ref-format v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-ref-format)
Compiling base64 v0.21.7
Compiling is_terminal_polyfill v1.70.2
Compiling anstyle v1.0.13
Compiling colorchoice v1.0.0
Compiling iana-time-zone v0.1.60
Compiling anstream v0.6.21
Compiling chrono v0.4.38
Compiling colored v2.1.0
Compiling radicle-localtime v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-localtime)
Compiling gix-error v0.0.0
Compiling serde-untagged v0.1.7
Compiling bytesize v2.0.1
Compiling dunce v1.0.5
Compiling tree-sitter-language v0.1.2
Compiling fast-glob v0.3.3
Compiling gix-date v0.14.0
Compiling adler2 v2.0.0
Compiling gix-actor v0.39.0
Compiling gix-date v0.13.0
Compiling gix-fs v0.19.1
Compiling gix-tempfile v21.0.1
Compiling gix-actor v0.38.0
Compiling gix-object v0.56.0
Compiling gix-chunk v0.6.0
Compiling mio v1.0.4
Compiling gix-quote v0.6.2
Compiling gix-commitgraph v0.33.0
Compiling gix-object v0.55.0
Compiling gix-chunk v0.5.0
Compiling sem_safe v0.2.0
Compiling errno v0.3.13
Compiling unicode-segmentation v1.11.0
Compiling either v1.11.0
Compiling shell-words v1.1.0
Compiling gix-command v0.7.1
Compiling signals_receipts v0.2.0
Compiling gix-commitgraph v0.32.0
Compiling gix-revwalk v0.27.0
Compiling gix-revwalk v0.26.0
Compiling gix-lock v21.0.1
Compiling gix-url v0.35.1
Compiling gix-config-value v0.17.1
Compiling gix-sec v0.13.1
Compiling signal-hook-registry v1.4.5
Compiling gimli v0.32.3
Compiling signal-hook v0.3.18
Compiling gix-prompt v0.13.1
Compiling gix-traverse v0.52.0
Compiling object v0.37.3
Compiling addr2line v0.25.1
Compiling gix-revision v0.41.0
Compiling radicle-signals v0.11.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-signals)
Compiling gix-diff v0.58.0
Compiling miniz_oxide v0.8.8
Compiling gix-glob v0.24.0
Compiling sqlite3-sys v0.15.2
Compiling sqlite v0.32.0
Compiling mio v0.8.11
Compiling radicle-crypto v0.15.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-crypto)
Compiling gix-packetline v0.21.1
Compiling tree-sitter v0.24.4
Compiling rustc-demangle v0.1.26
Compiling rustix v0.38.34
Compiling backtrace v0.3.76
Compiling signal-hook-mio v0.2.4
Compiling gix-transport v0.54.0
Compiling gix-refspec v0.37.0
Compiling gix-pack v0.65.0
Compiling arc-swap v1.8.2
Compiling gix-credentials v0.36.0
Compiling gix-ref v0.59.0
Compiling gix-shallow v0.8.1
Compiling gix-negotiate v0.27.0
Compiling convert_case v0.7.1
Compiling regex v1.11.1
Compiling gix-protocol v0.57.0
Compiling derive_more-impl v2.0.1
Compiling gix-odb v0.75.0
Compiling xattr v1.3.1
Compiling uuid v1.20.0
Compiling filetime v0.2.23
Compiling unicode-width v0.2.1
Compiling bytes v1.11.1
Compiling bitflags v1.3.2
Compiling crossterm v0.25.0
Compiling console v0.16.0
Compiling tar v0.4.40
Compiling git-ref-format-macro v0.6.0
Compiling flate2 v1.1.1
Compiling derive_more v2.0.1
Compiling portable-atomic v1.11.0
Compiling anyhow v1.0.82
Compiling newline-converter v0.3.0
Compiling snapbox-macros v0.3.8
Compiling salsa20 v0.10.2
Compiling fxhash v0.2.1
Compiling siphasher v0.3.11
Compiling unit-prefix v0.5.1
Compiling unicode-width v0.1.11
Compiling clap_lex v0.7.5
Compiling similar v2.5.0
Compiling normalize-line-endings v0.3.0
Compiling strsim v0.11.1
Compiling streaming-iterator v0.1.9
Compiling snapbox v0.4.17
Compiling clap_builder v4.5.44
Compiling inquire v0.7.5
Compiling bloomy v1.2.0
Compiling indicatif v0.18.0
Compiling radicle-surf v0.27.0
Compiling scrypt v0.11.0
Compiling crossterm v0.29.0
Compiling git-ref-format v0.6.0
Compiling unicode-display-width v0.3.0
Compiling systemd-journal-logger v2.2.2
Compiling serde_spanned v1.0.4
Compiling toml_datetime v0.7.5+spec-1.1.0
Compiling tree-sitter-md v0.3.2
Compiling tree-sitter-ruby v0.23.1
Compiling tree-sitter-html v0.23.2
Compiling tree-sitter-toml-ng v0.6.0
Compiling tree-sitter-typescript v0.23.2
Compiling tree-sitter-python v0.23.4
Compiling tree-sitter-css v0.23.1
Compiling tree-sitter-go v0.23.4
Compiling tree-sitter-rust v0.23.2
Compiling tree-sitter-c v0.23.2
Compiling tree-sitter-bash v0.23.3
Compiling tree-sitter-json v0.24.8
Compiling pin-project-lite v0.2.16
Compiling radicle-std-ext v0.2.0
Compiling toml_writer v1.0.6+spec-1.1.0
Compiling tokio v1.47.1
Compiling toml v0.9.12+spec-1.1.0
Compiling clap v4.5.44
Compiling sysinfo v0.37.2
Compiling radicle-node v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-node)
Compiling yansi v0.5.1
Compiling diff v0.1.13
Compiling radicle-cli v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli)
Compiling pretty_assertions v1.4.0
Compiling human-panic v2.0.6
Compiling clap_complete v4.5.60
Compiling structured-logger v1.0.4
Compiling radicle-systemd v0.12.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-systemd)
Compiling tree-sitter-highlight v0.24.4
Compiling itertools v0.14.0
Compiling num-integer v0.1.46
Compiling socket2 v0.5.7
Compiling lexopt v0.3.0
Compiling timeago v0.4.2
Compiling bit-vec v0.8.0
Compiling bit-set v0.8.0
Compiling escargot v0.5.10
Compiling num-bigint v0.4.6
Compiling rand_core v0.9.3
Compiling num-iter v0.1.45
Compiling num-complex v0.4.6
Compiling env_filter v0.1.3
Compiling zerocopy v0.7.35
Compiling num-rational v0.4.2
Compiling borrow-or-share v0.2.2
Compiling fluent-uri v0.3.2
Compiling ahash v0.8.11
Compiling num v0.4.3
Compiling env_logger v0.11.8
Compiling phf_shared v0.11.3
Compiling wait-timeout v0.2.1
Compiling ppv-lite86 v0.2.17
Compiling radicle-remote-helper v0.14.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-remote-helper)
Compiling outref v0.5.2
Compiling vsimd v0.8.0
Compiling fnv v1.0.7
Compiling quick-error v1.2.3
Compiling rusty-fork v0.3.1
Compiling rand_chacha v0.9.0
Compiling git2 v0.20.4
Compiling uuid-simd v0.8.0
Compiling test-log v0.2.19
Compiling phf v0.11.3
Compiling fraction v0.15.3
Compiling referencing v0.30.0
Compiling rand_xorshift v0.4.0
Compiling rand v0.9.2
Compiling fancy-regex v0.14.0
Compiling email_address v0.2.9
Compiling num-cmp v0.1.0
Compiling unarray v0.1.4
Compiling bytecount v0.6.8
Compiling base64 v0.22.1
Compiling proptest v1.9.0
Compiling emojis v0.6.4
Compiling jsonschema v0.30.0
Compiling radicle-oid v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-oid)
Compiling radicle-git-ext v0.12.0
Compiling radicle-cob v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cob)
Compiling radicle-core v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-core)
Compiling radicle v0.21.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle)
Compiling radicle-term v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-term)
Compiling radicle-windows v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-windows)
Compiling radicle-fetch v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-fetch)
Compiling radicle-protocol v0.5.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-protocol)
Compiling radicle-cli-test v0.13.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli-test)
Compiling radicle-schemars v0.6.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-schemars)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 06s
+ cargo doc --workspace --no-deps --all-features
Checking regex-automata v0.4.9
Compiling syn v1.0.109
Checking idna v1.0.3
Compiling num-traits v0.2.19
Checking radicle-ssh v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-ssh)
Checking url v2.5.4
Checking git2 v0.20.4
Checking proptest v1.9.0
Checking bstr v1.12.0
Checking gix-validate v0.11.0
Checking git-ref-format-core v0.6.0
Compiling amplify_syn v2.0.1
Checking gix-path v0.11.1
Compiling data-encoding-macro-internal v0.1.12
Checking radicle-git-ref-format v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-ref-format)
Checking gix-error v0.1.0
Checking gix-features v0.46.1
Checking gix-error v0.0.0
Checking gix-hash v0.22.1
Checking radicle-dag v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-dag)
Checking data-encoding-macro v0.1.14
Checking gix-hashtable v0.12.0
Checking radicle-oid v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-oid)
Checking multibase v0.9.1
Checking radicle-git-metadata v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-metadata)
Compiling amplify_derive v4.0.0
Checking gix-date v0.14.0
Checking chrono v0.4.38
Checking radicle-localtime v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-localtime)
Checking gix-actor v0.39.0
Checking gix-date v0.13.0
Checking gix-fs v0.19.1
Checking gix-actor v0.38.0
Checking gix-tempfile v21.0.1
Checking gix-object v0.56.0
Checking gix-chunk v0.6.0
Checking gix-quote v0.6.2
Checking gix-commitgraph v0.33.0
Checking gix-object v0.55.0
Checking gix-chunk v0.5.0
Checking gix-command v0.7.1
Checking gix-commitgraph v0.32.0
Checking gix-revwalk v0.27.0
Checking gix-lock v21.0.1
Checking gix-url v0.35.1
Checking gix-revwalk v0.26.0
Checking gix-config-value v0.17.1
Checking amplify v4.6.0
Checking gix-diff v0.58.0
Checking gix-traverse v0.52.0
Checking gix-prompt v0.13.1
Checking gix-revision v0.41.0
Checking radicle-signals v0.11.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-signals)
Checking cyphergraphy v0.3.0
Checking gix-glob v0.24.0
Checking gix-packetline v0.21.1
Checking regex v1.11.1
Checking cypheraddr v0.4.0
Checking noise-framework v0.4.0
Checking gix-refspec v0.37.0
Checking tree-sitter v0.24.4
Checking gix-transport v0.54.0
Checking gix-pack v0.65.0
Checking socks5-client v0.4.1
Checking git-ref-format v0.6.0
Checking gix-credentials v0.36.0
Checking cyphernet v0.5.2
Checking gix-ref v0.59.0
Checking radicle-crypto v0.15.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-crypto)
Checking gix-shallow v0.8.1
Checking gix-negotiate v0.27.0
Checking radicle-core v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-core)
Checking radicle-cob v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cob)
Checking radicle-git-ext v0.12.0
Checking gix-odb v0.75.0
Checking gix-protocol v0.57.0
Checking uuid v1.20.0
Checking radicle v0.21.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle)
Compiling radicle-cli v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli)
Checking human-panic v2.0.6
Checking radicle-surf v0.27.0
Checking tree-sitter-toml-ng v0.6.0
Checking radicle-term v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-term)
Checking tree-sitter-highlight v0.24.4
Checking radicle-systemd v0.12.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-systemd)
Documenting radicle-systemd v0.12.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-systemd)
Documenting radicle v0.21.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle)
Documenting radicle-term v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-term)
Documenting radicle-cob v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cob)
Documenting radicle-core v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-core)
Documenting radicle-crypto v0.15.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-crypto)
Documenting radicle-signals v0.11.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-signals)
Documenting radicle-oid v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-oid)
Documenting radicle-git-ref-format v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-ref-format)
Documenting radicle-localtime v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-localtime)
Documenting radicle-ssh v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-ssh)
Documenting radicle-dag v0.10.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-dag)
Documenting radicle-git-metadata v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-git-metadata)
Documenting radicle-windows v0.1.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-windows)
Checking radicle-fetch v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-fetch)
Documenting radicle-cli v0.18.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli)
Documenting radicle-schemars v0.6.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-schemars)
Checking radicle-protocol v0.5.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-protocol)
Documenting radicle-protocol v0.5.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-protocol)
Documenting radicle-node v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-node)
Documenting radicle-fetch v0.17.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-fetch)
Documenting radicle-cli-test v0.13.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-cli-test)
Documenting radicle-remote-helper v0.14.0 (/5e32c98e-8955-4a77-b777-3b4fcca64a04/w/crates/radicle-remote-helper)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 11.56s
Generated /5e32c98e-8955-4a77-b777-3b4fcca64a04/w/target/doc/radicle/index.html and 21 other files
+ cargo test --workspace --no-fail-fast
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.17s
Running unittests src/lib.rs (target/debug/deps/radicle-5d7696ca4698d814)
running 238 tests
test canonical::formatter::test::ascii_control_characters ... ok
test canonical::formatter::test::ordered_nested_object ... ok
test canonical::formatter::test::securesystemslib_asserts ... ok
test cob::cache::migrations::_2::tests::test_patch_json_deserialization ... ok
test cob::cache::migrations::_2::tests::test_migration_2 ... ok
test cob::cache::tests::test_check_version ... ok
test cob::cache::tests::test_migrate_to ... ok
test cob::common::test::test_color ... ok
test cob::common::test::test_title ... ok
test cob::common::test::test_emojis ... ok
test cob::identity::test::prop_json_eq_str ... ok
test cob::identity::test::test_identity_redact_revision ... ok
test cob::identity::test::test_identity_update_rejected ... ok
test cob::identity::test::test_identity_remove_delegate_concurrent ... ok
test cob::identity::test::test_identity_reject_concurrent ... ok
test cob::identity::test::test_identity_updates ... ok
test cob::issue::cache::tests::test_counts ... ok
test cob::issue::cache::tests::test_get ... ok
test cob::issue::cache::tests::test_is_empty ... ok
test cob::issue::cache::tests::test_list ... ok
test cob::issue::cache::tests::test_list_by_status ... ok
test cob::issue::cache::tests::test_remove ... ok
test cob::identity::test::test_identity_updates_concurrent ... ok
test cob::identity::test::test_valid_identity ... ok
test cob::issue::test::test_embeds ... ok
test cob::issue::test::test_embeds_edit ... ok
test cob::identity::test::test_identity_updates_concurrent_outdated ... ok
test cob::issue::test::test_invalid_actions ... ok
test cob::issue::test::test_invalid_tx ... ok
test cob::issue::test::test_invalid_tx_reference ... ok
test cob::issue::test::test_invalid_cob ... ok
test cob::issue::test::test_concurrency ... ok
test cob::issue::test::test_issue_all ... ok
test cob::issue::test::test_issue_comment ... ok
test cob::issue::test::test_issue_create_and_assign ... ok
test cob::issue::test::test_issue_create_and_change_state ... ok
test cob::issue::test::test_issue_comment_redact ... ok
test cob::issue::test::test_issue_create_and_get ... ok
test cob::issue::test::test_issue_create_and_unassign ... ok
test cob::issue::test::test_issue_edit ... ok
test cob::issue::test::test_issue_edit_description ... ok
test cob::issue::test::test_issue_create_and_reassign ... ok
test cob::issue::test::test_issue_multilines ... ok
test cob::issue::test::test_issue_state_serde ... ok
test cob::issue::test::test_ordering ... ok
test cob::patch::actions::test::test_review_edit ... ok
test cob::issue::test::test_issue_label ... ok
test cob::issue::test::test_issue_react ... ok
test cob::patch::cache::tests::test_find_by_revision ... ok
test cob::patch::cache::tests::test_is_empty ... ok
test cob::issue::test::test_issue_reply ... ok
test cob::patch::cache::tests::test_list_by_status ... ok
test cob::patch::cache::tests::test_list ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_null_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_with_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_migration_without_summary ... ok
test cob::patch::encoding::review::test::test_review_deserialize_summary_v2 ... ok
test cob::patch::encoding::review::test::test_review_summary ... ok
test cob::patch::test::test_json ... ok
test cob::patch::test::test_json_serialization ... ok
test cob::patch::test::test_patch_create_and_get ... ok
test cob::patch::cache::tests::test_get ... ok
test cob::patch::test::test_patch_discussion ... ok
test cob::patch::cache::tests::test_remove ... ok
test cob::patch::cache::tests::test_counts ... ok
test cob::patch::test::test_patch_merge ... ok
test cob::patch::test::test_patch_redact ... ok
test cob::patch::test::test_patch_review_comment ... ok
test cob::patch::test::test_patch_review ... ok
test cob::patch::test::test_patch_review_duplicate ... ok
test cob::patch::test::test_patch_review_edit ... ok
test cob::patch::test::test_patch_review_remove_summary ... ok
test cob::patch::test::test_reactions_json_serialization ... ok
test cob::patch::test::test_revision_edit_redact ... ok
test cob::patch::test::test_revision_reaction ... ok
test cob::patch::test::test_revision_review_merge_redacted ... ok
test cob::patch::test::test_patch_review_edit_comment ... ok
test cob::stream::tests::test_all_from_until ... ok
test cob::stream::tests::test_all_from ... ok
test cob::stream::tests::test_all_until ... ok
test cob::stream::tests::test_from_until ... ok
test cob::patch::test::test_patch_review_revision_redact ... ok
test cob::thread::tests::test_comment_edit_missing ... ok
test cob::thread::tests::test_comment_edit_redacted ... ok
test cob::thread::tests::test_comment_redact_missing ... ok
test cob::stream::tests::test_regression_from_until ... ok
test cob::thread::tests::test_duplicate_comments ... ok
test cob::thread::tests::test_edit_comment ... ok
test cob::thread::tests::test_redact_comment ... ok
test git::canonical::quorum::test::merge_base_commutative ... ok
test git::canonical::quorum::test::test_merge_bases ... ok
test cob::thread::tests::test_timeline ... ok
test git::canonical::rules::tests::test_deserialization ... ok
test git::canonical::rules::tests::test_deserialize_extensions ... ok
test git::canonical::rules::tests::test_order ... ok
test git::canonical::rules::tests::test_roundtrip ... ok
test cob::patch::test::test_patch_update ... ok
test git::canonical::rules::tests::test_rule_validate_success ... ok
test git::canonical::rules::tests::test_special_branches ... ok
test git::canonical::tests::test_commit_quorum_fork_of_a_fork ... ok
test git::canonical::tests::test_commit_quorum_forked_merge_commits ... ok
test git::canonical::tests::test_commit_quorum_groups ... ok
test git::canonical::tests::test_commit_quorum_linear ... ok
test git::canonical::tests::test_commit_quorum_merges ... ok
test git::canonical::tests::test_commit_quorum_single ... ok
test git::canonical::tests::test_commit_quorum_three_way_fork ... ok
test git::canonical::tests::test_commit_quorum_two_way_fork ... ok
test git::canonical::tests::test_quorum_different_types ... ok
test git::canonical::rules::tests::test_canonical ... ok
test git::canonical::tests::test_tag_quorum ... ok
test git::test::test_version_from_str ... ok
test git::test::test_version_ord ... ok
test identity::did::test::test_did_encode_decode ... ok
test identity::did::test::test_did_vectors ... ok
test git::canonical::rules::tests::test_rule_validate_failures ... ok
test identity::doc::test::test_canonical_doc ... ok
test identity::doc::test::test_canonical_example ... ok
test identity::doc::test::test_duplicate_dids ... ok
test identity::doc::test::test_future_version_error ... ok
test identity::doc::test::test_is_valid_version ... ok
test identity::doc::test::test_max_delegates ... ok
test identity::doc::test::test_not_found ... ok
test identity::doc::test::test_parse_version ... ok
test identity::doc::test::test_visibility_json ... ok
test identity::doc::update::test::test_can_update_crefs ... ok
test identity::doc::update::test::test_cannot_include_default_branch_rule ... ok
test identity::doc::update::test::test_default_branch_rule_exists_after_verification ... ok
test identity::project::test::test_project_name ... ok
test node::address::store::test::test_alias ... ok
test node::address::store::test::test_disconnected ... ok
test node::address::store::test::test_disconnected_ban ... ok
test node::address::store::test::test_empty ... ok
test node::address::store::test::test_entries ... ok
test node::address::store::test::test_get_none ... ok
test node::address::store::test::test_insert_and_get ... ok
test node::address::store::test::test_insert_and_remove ... ok
test node::address::store::test::test_insert_and_update ... ok
test node::address::store::test::test_insert_duplicate ... ok
test node::address::store::test::test_node_aliases ... ok
test node::address::store::test::test_remove_nothing ... ok
test node::command::test::command_result ... ok
test node::config::test::deserialize_migrating_scope ... ok
test node::config::test::partial ... ok
test node::config::test::serialize_migrating_scope ... ok
test node::db::test::test_version ... ok
test node::features::test::test_operations ... ok
test node::notifications::store::test::test_branch_notifications ... ok
test node::notifications::store::test::test_clear ... ok
test node::notifications::store::test::test_cob_notifications ... ok
test node::notifications::store::test::test_counts_by_repo ... ok
test node::notifications::store::test::test_duplicate_notifications ... ok
test node::notifications::store::test::test_notification_status ... ok
test node::policy::store::test::test_follow_and_unfollow_node ... ok
test node::policy::store::test::test_node_aliases ... ok
test node::policy::store::test::test_node_policies ... ok
test node::policy::store::test::test_node_policy ... ok
test node::policy::store::test::test_repo_policies ... ok
test node::policy::store::test::test_repo_policy ... ok
test node::policy::store::test::test_seed_and_unseed_repo ... ok
test node::policy::store::test::test_update_alias ... ok
test node::policy::store::test::test_update_scope ... ok
test node::refs::store::test::test_count ... ok
test node::refs::store::test::test_set_and_delete ... ok
test node::refs::store::test::test_set_and_get ... ok
test node::routing::test::test_count ... ok
test node::routing::test::test_entries ... ok
test node::routing::test::test_insert_and_get ... ok
test node::routing::test::test_insert_and_get_resources ... ok
test node::routing::test::test_insert_and_remove ... ok
test node::routing::test::test_insert_duplicate ... ok
test node::routing::test::test_insert_existing_updated_time ... ok
test node::routing::test::test_len ... ok
test node::routing::test::test_prune ... ok
test node::routing::test::test_remove_many ... ok
test node::routing::test::test_remove_redundant ... ok
test node::routing::test::test_update_existing_multi ... ok
test node::sync::announce::test::all_synced_nodes_are_preferred_seeds ... ok
test node::sync::announce::test::announcer_adapts_target_to_reach ... ok
test node::sync::announce::test::announcer_preferred_seeds_or_replica_factor ... ok
test node::sync::announce::test::announcer_reached_max_replication_target ... ok
test node::sync::announce::test::announcer_reached_min_replication_target ... ok
test node::sync::announce::test::announcer_reached_preferred_seeds ... ok
test node::sync::announce::test::announcer_synced_with_unknown_node ... ok
test node::sync::announce::test::announcer_timed_out ... ok
test node::sync::announce::test::announcer_with_replication_factor_zero_and_preferred_seeds ... ok
test node::sync::announce::test::cannot_construct_announcer ... ok
test node::sync::announce::test::construct_node_appears_in_multiple_input_sets ... ok
test node::sync::announce::test::construct_only_preferred_seeds_provided ... ok
test node::sync::announce::test::invariant_progress_should_match_state ... ok
test node::sync::announce::test::local_node_in_multiple_sets ... ok
test node::sync::announce::test::local_node_in_preferred_seeds ... ok
test git::canonical::tests::test_quorum_properties ... ok
test node::sync::announce::test::local_node_in_synced_set ... ok
test node::sync::announce::test::local_node_only_in_all_sets_results_in_no_seeds_error ... ok
test node::sync::announce::test::preferred_seeds_already_synced ... ok
test node::sync::announce::test::local_node_in_unsynced_set ... ok
test node::sync::announce::test::synced_with_same_node_multiple_times ... ok
test node::sync::announce::test::synced_with_local_node_is_ignored ... ok
test node::sync::announce::test::timed_out_after_reaching_success ... ok
test node::sync::fetch::test::all_nodes_are_fetchable ... ok
test node::sync::fetch::test::all_nodes_are_candidates ... ok
test node::sync::fetch::test::could_not_reach_target ... ok
test node::sync::fetch::test::ignores_duplicates_and_local_node ... ok
test node::sync::fetch::test::preferred_seeds_target_returned_over_replicas ... ok
test node::sync::fetch::test::reaches_target_of_max_replicas ... ok
test node::sync::fetch::test::reaches_target_of_preferred_seeds ... ok
test node::sync::test::ensure_replicas_construction ... ok
test node::sync::test::replicas_constrain_to ... ok
test node::test::test_alias ... ok
test node::test::test_command_result ... ok
test node::test::test_user_agent ... ok
test node::timestamp::tests::test_timestamp_max ... ok
test node::sync::fetch::test::reaches_target_of_replicas ... ok
test profile::test::canonicalize_home ... ok
test profile::test::test_config ... ok
test cob::thread::tests::prop_ordering ... ok
test rad::tests::test_checkout ... ok
test rad::tests::test_fork ... ok
test rad::tests::test_init ... ok
test storage::git::tests::test_references_of ... ok
test storage::git::tests::test_sign_refs ... ok
test storage::git::transport::local::url::test::test_url_parse ... ok
test storage::git::transport::local::url::test::test_url_to_string ... ok
test storage::git::transport::remote::url::test::test_url_parse ... ok
test storage::refs::tests::prop_canonical_roundtrip ... ok
test profile::config::test::schema ... ok
test storage::tests::test_storage ... ok
test test::assert::test::assert_with_message ... ok
test test::assert::test::test_assert_no_move ... ok
test test::assert::test::test_assert_panic_0 - should panic ... ok
test test::assert::test::test_assert_panic_1 - should panic ... ok
test test::assert::test::test_assert_panic_2 - should panic ... ok
test test::assert::test::test_assert_succeed ... ok
test test::assert::test::test_panic_message ... ok
test version::test::test_version ... ok
test storage::git::tests::test_remote_refs ... ok
test storage::refs::tests::test_rid_verification ... ok
test identity::doc::test::prop_encode_decode ... ok
test result: ok. 238 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.22s
Running unittests src/lib.rs (target/debug/deps/radicle_cli-03b96c66aa09c126)
running 46 tests
test commands::block::args::test::should_not_parse ... ok
test commands::block::args::test::should_parse_nid ... ok
test commands::clone::args::test::should_parse_rid_non_urn ... ok
test commands::block::args::test::should_parse_rid ... ok
test commands::clone::args::test::should_parse_rid_url ... ok
test commands::clone::args::test::should_parse_rid_urn ... ok
test commands::cob::args::test::should_allow_log_json_format ... ok
test commands::cob::args::test::should_allow_log_pretty_format ... ok
test commands::cob::args::test::should_allow_show_json_format ... ok
test commands::cob::args::test::should_allow_update_json_format ... ok
test commands::cob::args::test::should_not_allow_show_pretty_format ... ok
test commands::fork::args::test::should_not_parse_rid_url ... ok
test commands::cob::args::test::should_not_allow_update_pretty_format ... ok
test commands::fork::args::test::should_parse_rid_urn ... ok
test commands::fork::args::test::should_parse_rid_non_urn ... ok
test commands::id::args::test::should_not_clobber_payload_args ... ok
test commands::id::args::test::should_not_parse_into_payload - should panic ... ok
test commands::id::args::test::should_not_parse_single_payload ... ok
test commands::id::args::test::should_not_parse_single_payloads ... ok
test commands::id::args::test::should_parse_into_payload ... ok
test commands::id::args::test::should_parse_multiple_payloads ... ok
test commands::id::args::test::should_parse_single_payload ... ok
test commands::init::args::test::should_not_parse_rid_url ... ok
test commands::init::args::test::should_parse_rid_non_urn ... ok
test commands::init::args::test::should_parse_rid_urn ... ok
test commands::inspect::test::test_tree ... ok
test commands::patch::review::builder::tests::test_review_comments_basic ... ok
test commands::patch::review::builder::tests::test_review_comments_before ... ok
test commands::patch::review::builder::tests::test_review_comments_multiline ... ok
test commands::patch::review::builder::tests::test_review_comments_split_hunk ... ok
test commands::publish::args::test::should_not_parse_rid_url ... ok
test commands::publish::args::test::should_parse_rid_non_urn ... ok
test commands::publish::args::test::should_parse_rid_urn ... ok
test commands::watch::args::test::should_parse_ref_str ... ok
test git::pretty_diff::test::test_pretty ... ignored
test git::ddiff::tests::diff_encode_decode_ddiff_hunk ... ok
test git::unified_diff::test::test_diff_content_encode_decode_content ... ok
test git::unified_diff::test::test_diff_encode_decode_diff ... ok
test terminal::args::test::should_not_parse ... ok
test terminal::format::test::test_bytes ... ok
test terminal::args::test::should_parse_rid ... ok
test terminal::args::test::should_parse_nid ... ok
test terminal::format::test::test_strip_comments ... ok
test terminal::patch::test::test_edit_display_message ... ok
test terminal::patch::test::test_create_display_message ... ok
test terminal::patch::test::test_update_display_message ... ok
test result: ok. 45 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running unittests src/main.rs (target/debug/deps/rad-d085b1d82f7b7af6)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests/commands.rs (target/debug/deps/commands-4bab3ac2ca96e045)
running 113 tests
test commands::checkout::rad_checkout ... ok
test commands::clone::rad_clone_bare ... ok
test commands::clone::rad_clone ... ok
test commands::clone::rad_clone_all ... ok
test commands::clone::rad_clone_unknown ... ok
test commands::clone::test_clone_without_seeds ... ok
test commands::clone::rad_clone_connect ... ok
test commands::clone::rad_clone_directory ... ok
test commands::cob::rad_cob_multiset ... ok
test commands::cob::rad_cob_log ... ok
test commands::clone::rad_clone_partial_fail ... ok
test commands::cob::rad_cob_operations ... ok
test commands::cob::rad_cob_migrate ... ok
test commands::cob::rad_cob_show ... ok
test commands::cob::rad_cob_update ... ok
test commands::cob::rad_cob_update_identity ... ok
test commands::cob::test_cob_deletion ... ok
test commands::cob::test_cob_replication ... ok
test commands::git::git_push_amend ... ok
test commands::git::git_push_and_fetch ... ok
test commands::git::git_push_canonical_annotated_tags ... ok
test commands::git::git_push_canonical_lightweight_tags ... ok
test commands::git::git_push_diverge ... ok
test commands::git::git_push_force_with_lease ... ok
test commands::id::rad_id ... ok
test commands::id::rad_id_collaboration ... ignored, slow
test commands::git::git_push_rollback ... ok
test commands::git::git_push_converge ... ok
test commands::git::git_tag ... ok
test commands::id::rad_id_private ... ok
test commands::id::rad_id_threshold_soft_fork ... ok
test commands::id::rad_id_conflict ... ok
test commands::id::rad_id_threshold ... ok
test commands::id::rad_id_unknown_field ... ok
test commands::id::rad_id_update_delete_field ... ok
test commands::init::rad_init ... ignored, part of many other tests
test commands::id::rad_id_unauthorized_delegate ... ok
test commands::init::rad_init_bare ... ok
test commands::init::rad_init_detached_head ... ok
test commands::id::rad_id_multi_delegate ... ok
test commands::init::rad_init_existing ... ok
test commands::init::rad_init_no_git ... ok
test commands::init::rad_init_existing_bare ... ok
test commands::init::rad_init_no_seed ... ok
test commands::init::rad_init_private ... ok
test commands::init::rad_init_private_no_seed ... ok
test commands::init::rad_init_private_clone ... ok
test commands::inbox::rad_inbox ... ok
test commands::init::rad_init_private_clone_seed ... ok
test commands::init::rad_init_private_seed ... ok
test commands::init::rad_init_sync_not_connected ... ok
test commands::init::rad_init_sync_preferred ... ok
test commands::init::rad_init_with_existing_remote ... ok
test commands::init::rad_publish ... ok
test commands::issue::rad_issue ... ok
test commands::jj::rad_jj_bare ... ok
test commands::jj::rad_jj_colocated_patch ... ok
test commands::issue::rad_issue_list ... ok
test commands::node::rad_node_connect ... ok
test commands::node::rad_node_connect_without_address ... ok
test commands::patch::rad_merge_after_update ... ok
test commands::patch::rad_merge_no_ff ... ok
test commands::node::rad_node ... ok
test commands::patch::rad_merge_via_push ... ok
test commands::patch::rad_patch ... ok
test commands::patch::rad_patch_ahead_behind ... ok
test commands::patch::rad_patch_change_base ... ok
test commands::patch::rad_patch_checkout ... ok
test commands::patch::rad_patch_checkout_revision ... ok
test commands::init::rad_init_sync_timeout ... ok
test commands::patch::rad_patch_checkout_force ... ok
test commands::patch::rad_patch_detached_head ... ok
test commands::init::rad_init_sync_and_clone ... ok
test commands::patch::rad_patch_diff ... ok
test commands::patch::rad_patch_draft ... ok
test commands::patch::rad_patch_edit ... ok
test commands::patch::rad_patch_fetch_2 ... FAILED
test commands::patch::rad_patch_merge_draft ... ok
test commands::patch::rad_patch_fetch_1 ... ok
test commands::patch::rad_patch_revert_merge ... ok
test commands::patch::rad_patch_open_explore ... ok
test commands::patch::rad_patch_update ... ok
test commands::patch::rad_patch_delete ... ok
test commands::patch::rad_patch_via_push ... FAILED
test commands::policy::rad_block ... ok
test commands::policy::rad_seed_and_follow ... ok
test commands::patch::rad_review_by_hunk ... ok
test commands::policy::rad_seed_policy_allow_no_scope ... ok
test commands::policy::rad_unseed ... ok
test commands::policy::rad_unseed_many ... ok
test commands::policy::rad_seed_many ... ok
test commands::patch::rad_push_and_pull_patches ... ok
test commands::remote::rad_remote ... ok
test commands::sync::rad_sync_without_node ... ok
test commands::sync::rad_sync ... ok
test commands::utility::framework_home ... ok
test commands::utility::rad_auth ... ok
test commands::utility::rad_auth_errors ... ok
test commands::patch::rad_patch_pull_update ... ok
test commands::utility::rad_config ... ok
test commands::utility::rad_clean ... ok
test commands::utility::rad_diff ... ok
test commands::utility::rad_help ... ok
test commands::utility::rad_inspect ... ok
test commands::utility::rad_key_mismatch ... ok
test commands::utility::rad_self ... ok
test commands::utility::rad_warn_old_nodes ... ok
test commands::sync::rad_fetch ... ok
test commands::watch::rad_watch ... ok
test rad_remote ... ok
test commands::workflow::rad_workflow ... ok
test commands::sync::test_replication_via_seed ... ok
test commands::utility::rad_fork ... ok
failures:
---- commands::patch::rad_patch_fetch_2 stdout ----
1788923794 test: rad-init:6: `rad init --name heartwood --description Radicle Heartwood Protocol & Stack --no-confirm --public -v` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-init:28: `rad init` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-init:35: `rad ls` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-init:46: `rad node inventory` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:6: `git checkout -b alice/1 -q` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:7: `git commit --allow-empty -m Changes #1 -q` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:8: `git push rad -o patch.message=Changes HEAD:refs/patches` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:12: `git checkout master -q` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:13: `git branch -D alice/1 -q` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:14: `git update-ref -d refs/remotes/rad/alice/1` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:15: `git update-ref -d refs/remotes/rad/patches/5e2dedcc5d515fcbc1cca483d3376609fe889bfb` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:16: `git gc --prune=now` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:17: `git branch -r` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:22: `git pull` @ /tmp/.tmpmiZEbs/alice/work
1788923794 test: rad-patch-fetch-2:24: `git branch -r` @ /tmp/.tmpmiZEbs/alice/work
thread 'commands::patch::rad_patch_fetch_2' panicked at crates/radicle-cli-test/src/lib.rs:502:36:
--- Expected
++++ actual: stdout
1 - rad/HEAD -> rad/master
2 1 | rad/master
3 2 | rad/patches/5e2dedcc5d515fcbc1cca483d3376609fe889bfb
Exit status: 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
---- commands::patch::rad_patch_via_push stdout ----
1788923795 test: rad-init:6: `rad init --name heartwood --description Radicle Heartwood Protocol & Stack --no-confirm --public -v` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-init:28: `rad init` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-init:35: `rad ls` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-init:46: `rad node inventory` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:7: `git checkout -b feature/1` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:9: `git commit -a -m Add things -q --allow-empty` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:10: `git push -o patch.message=Add things #1 -o patch.message=See commits for details. rad HEAD:refs/patches` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:22: `rad patch show 6035d2f582afbe01ff23ea87528ae523d76875b6` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:45: `git branch -vv` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:53: `git status --short --branch` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:55: `git fetch` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:56: `git push` @ /tmp/.tmp6wErR1/alice/work
1788923795 test: rad-patch-via-push:62: `git show-ref` @ /tmp/.tmp6wErR1/alice/work
thread 'commands::patch::rad_patch_via_push' panicked at crates/radicle-cli-test/src/lib.rs:502:36:
--- Expected
++++ actual: stdout
1 1 | 42d894a83c9c356552a57af09ccdbd5587a99045 refs/heads/feature/1
2 2 | f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/heads/master
3 - f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/remotes/rad/HEAD
4 3 | f2de534b5e81d7c6e2dcaf58c3dd91573c0a0354 refs/remotes/rad/master
5 4 | 42d894a83c9c356552a57af09ccdbd5587a99045 refs/remotes/rad/patches/6035d2f582afbe01ff23ea87528ae523d76875b6
Exit status: 0
failures:
commands::patch::rad_patch_fetch_2
commands::patch::rad_patch_via_push
test result: FAILED. 109 passed; 2 failed; 2 ignored; 0 measured; 0 filtered out; finished in 73.41s
error: test failed, to rerun pass `-p radicle-cli --test commands`
Running unittests src/lib.rs (target/debug/deps/radicle_cli_test-25ce6b1213d3da11)
running 3 tests
test tests::test_parse ... ok
test tests::test_run ... ok
test tests::test_example_spaced_brackets ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_cob-bab4a18d71357639)
running 9 tests
test object::tests::test_serde ... ok
test tests::git::list_cobs ... ok
test tests::git::update_cob ... ok
test tests::invalid_parse_refstr ... ok
test type_name::test::invalid_typenames ... ok
test type_name::test::valid_typenames ... ok
test tests::git::roundtrip ... ok
test tests::parse_refstr ... ok
test tests::git::traverse_cobs ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
Running unittests src/lib.rs (target/debug/deps/radicle_core-ce5b02681caf3c49)
running 4 tests
test repo::test::valid ... ok
test repo::test::invalid ... ok
test repo::test::assert_prop_roundtrip_parse ... ok
test repo::serde_impls::test::assert_prop_roundtrip_serde_json ... ok
test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_crypto-55d6b392ea62c993)
running 12 tests
test ssh::fmt::test::test_key ... ok
test ssh::fmt::test::test_fingerprint ... ok
test ssh::keystore::tests::test_init_no_passphrase ... ok
test ssh::test::prop_encode_decode_sk ... ok
test ssh::test::test_agent_encoding_remove ... ok
test ssh::test::test_agent_encoding_sign ... ok
test tests::prop_encode_decode ... ok
test tests::test_e25519_dh ... ok
test tests::test_encode_decode ... ok
test tests::prop_key_equality ... ok
test ssh::keystore::tests::test_signer ... ok
test ssh::keystore::tests::test_init_passphrase ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.83s
Running unittests src/lib.rs (target/debug/deps/radicle_dag-05f7457e7194a495)
running 20 tests
test tests::test_cycle ... ok
test tests::test_contains ... ok
test tests::test_dependencies ... ok
test tests::test_diamond ... ok
test tests::test_fold_multiple_roots ... ok
test tests::test_fold_diamond ... ok
test tests::test_complex ... ok
test tests::test_fold_reject ... ok
test tests::test_fold_sorting_1 ... ok
test tests::test_fold_sorting_2 ... ok
test tests::test_get ... ok
test tests::test_is_empty ... ok
test tests::test_len ... ok
test tests::test_merge_1 ... ok
test tests::test_merge_2 ... ok
test tests::test_prune_1 ... ok
test tests::test_prune_2 ... ok
test tests::test_remove ... ok
test tests::test_prune_by_sorting ... ok
test tests::test_siblings ... ok
test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_fetch-5a74d73406d0aae4)
running 1 test
test stage::test::valid_refspecs ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_git_metadata-bd76d09cdbf02303)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_git_ref_format-09d2e35a065977f7)
running 9 tests
test test::component ... ok
test test::component_invalid - should panic ... ok
test test::qualified ... ok
test test::pattern ... ok
test test::qualified_pattern ... ok
test test::qualified_invalid - should panic ... ok
test test::qualified_pattern_invalid - should panic ... ok
test test::refname ... ok
test test::refname_invalid - should panic ... ok
test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_localtime-f75e94d3ba02c400)
running 1 test
test serde_impls::test::test_localtime ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_node-f32098b6eb7859f1)
running 78 tests
test control::tests::test_control_socket ... ok
test control::tests::test_seed_unseed ... ok
test fingerprint::tests::matching ... ok
test reactor::timer::tests::test_next ... ok
test reactor::timer::tests::test_wake ... ok
test reactor::timer::tests::test_wake_exact ... ok
test tests::e2e::test_block_active_connection ... ok
test tests::e2e::test_block_prevents_connection ... ok
test tests::e2e::missing_default_branch ... ok
test tests::e2e::missing_delegate_default_branch ... ok
test tests::e2e::test_background_foreground_fetch ... ok
test tests::e2e::test_block_prevents_fetch ... ok
test tests::e2e::test_channel_reader_limit ... ok
test tests::e2e::test_catchup_on_refs_announcements ... ok
test tests::e2e::test_clone ... ok
test tests::e2e::test_dont_fetch_owned_refs ... ok
test tests::e2e::test_connection_crossing ... ok
test tests::e2e::test_fetch_followed_remotes ... ok
test tests::e2e::test_concurrent_fetches ... ok
test tests::e2e::test_fetch_preserve_owned_refs ... ok
test tests::e2e::test_fetch_unseeded ... ok
test tests::e2e::test_fetch_up_to_date ... ok
test tests::e2e::test_inventory_sync_basic ... ok
test tests::e2e::test_fetch_emits_canonical_ref_update ... ok
test tests::e2e::test_large_fetch ... ok
test tests::e2e::test_migrated_clone ... ok
test tests::e2e::test_missing_remote ... ok
test tests::e2e::test_multiple_offline_inits ... ok
test tests::e2e::test_non_fastforward_identity_doc ... ok
test tests::e2e::test_non_fastforward_sigrefs ... ok
test tests::e2e::test_outdated_delegate_sigrefs ... ok
test tests::e2e::test_outdated_sigrefs ... ok
test tests::e2e::test_inventory_sync_bridge ... ok
test tests::e2e::test_replication ... ok
test tests::e2e::test_inventory_sync_ring ... ok
test tests::e2e::test_replication_ref_in_sigrefs ... ok
test tests::e2e::test_replication_invalid ... ok
test tests::e2e::test_inventory_sync_star ... ok
test tests::test_announcement_rebroadcast ... ok
test tests::test_announcement_rebroadcast_duplicates ... ok
test tests::test_announcement_rebroadcast_timestamp_filtered ... ok
test tests::test_announcement_relay ... ok
test tests::test_connection_kept_alive ... ok
test tests::test_disconnecting_unresponsive_peer ... ok
test tests::test_fetch_missing_inventory_on_gossip ... ok
test tests::test_fetch_missing_inventory_on_schedule ... ok
test tests::test_inbound_connection ... ok
test tests::test_inventory_decode ... ok
test tests::test_init_and_seed ... ok
test tests::test_inventory_relay ... ok
test tests::test_inventory_relay_bad_timestamp ... ok
test tests::test_inventory_sync ... ok
test tests::test_maintain_connections ... ok
test tests::test_maintain_connections_failed_attempt ... ok
test tests::test_maintain_connections_transient ... ok
test tests::test_outbound_connection ... ok
test tests::test_inventory_pruning ... ok
test tests::test_persistent_peer_connect ... ok
test tests::test_persistent_peer_reconnect_success ... ok
test tests::test_persistent_peer_reconnect_attempt ... ok
test tests::test_ping_response ... ok
test tests::test_queued_fetch_from_command_same_rid ... ok
test tests::test_queued_fetch_from_ann_same_rid ... ok
test tests::test_redundant_connect ... ok
test tests::test_queued_fetch_max_capacity ... ok
test tests::test_refs_announcement_followed ... ok
test tests::test_refs_announcement_fetch_trusted_no_inventory ... ok
test tests::test_refs_announcement_no_subscribe ... ok
test tests::test_refs_announcement_offline ... ok
test tests::test_refs_announcement_relay_private ... ok
test tests::test_refs_announcement_relay_public ... ok
test tests::test_refs_synced_event ... ok
test tests::test_seeding ... ok
test wire::test::test_inventory_ann_with_extension ... ok
test wire::test::test_pong_message_with_extension ... ok
test tests::test_seed_repo_subscribe ... ok
test tests::prop_inventory_exchange_dense ... ok
test tests::test_announcement_message_amplification ... ok
test result: ok. 78 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 17.25s
Running unittests src/main.rs (target/debug/deps/radicle_node-6ce0e9e4c117cda3)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_oid-8a3ece19594f1498)
running 10 tests
test fmt::test::fixture ... ok
test fmt::test::gix ... ok
test fmt::test::git2 ... ok
test fmt::test::zero ... ok
test git2::test::zero ... ok
test gix::test::zero ... ok
test str::test::fixture ... ok
test str::test::git2_roundtrip ... ok
test str::test::zero ... ok
test str::test::gix_roundrip ... ok
test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_protocol-c7054b3b2cad6ea1)
running 100 tests
test deserializer::test::test_decode_next ... ok
test deserializer::test::test_unparsed ... ok
test deserializer::test::prop_decode_next ... ok
test fetcher::service::tests::test_fetch_coalescing_different_refs ... ok
test fetcher::test::queue::properties::capacity::rejection ... ok
test fetcher::test::queue::properties::dequeue::drained_queue_returns_none ... ok
test fetcher::test::queue::properties::dequeue::empty_queue_returns_none ... ok
test fetcher::test::queue::properties::dequeue::enables_reenqueue ... ok
test fetcher::test::queue::properties::capacity::restored_after_dequeue ... ok
test fetcher::test::queue::properties::capacity::bounded ... ok
test fetcher::test::queue::properties::capacity::capacity_reached_returns_same_item ... ok
test fetcher::test::queue::properties::fifo::interleaved_operations ... ok
test fetcher::test::queue::properties::fifo::ordering ... ok
test fetcher::test::queue::properties::equality::reflexive ... ok
test fetcher::test::queue::properties::equality::symmetric ... ok
test fetcher::test::queue::properties::equality::transitive ... ok
test fetcher::test::queue::properties::merge::different_rid_accepted ... ok
test fetcher::test::queue::properties::merge::longer_timeout_preserved ... ok
test fetcher::test::queue::properties::merge::combines_refs ... ok
test fetcher::test::queue::properties::merge::same_rid_merges_anywhere_in_queue ... ok
test fetcher::test::queue::unit::capacity_takes_precedence_over_merge_for_new_items ... ok
test fetcher::test::queue::unit::empty_refs_items_can_be_equal ... ok
test fetcher::test::queue::unit::max_timeout_accepted ... ok
test fetcher::test::queue::unit::merge_preserves_position_in_queue ... ok
test fetcher::test::queue::unit::zero_timeout_accepted ... ok
test fetcher::test::state::command::cancel::cancellation_is_isolated ... ok
test fetcher::test::state::command::cancel::non_existent_returns_unexpected ... ok
test fetcher::test::state::command::cancel::ongoing_and_queued ... ok
test fetcher::test::state::command::cancel::single_ongoing ... ok
test fetcher::test::state::command::fetch::fetch_after_previous_completed ... ok
test fetcher::test::queue::properties::merge::succeed_when_at_capacity ... ok
test fetcher::test::state::command::fetch::fetch_at_capacity_enqueues ... ok
test fetcher::test::state::command::fetch::fetch_different_repo_same_node_within_capacity ... ok
test fetcher::test::state::command::fetch::fetch_duplicate_returns_already_fetching ... ok
test fetcher::test::state::command::fetch::fetch_queue_merge_empty_refs_fetches_all ... ok
test fetcher::test::state::command::fetch::fetch_queue_merge_takes_longer_timeout ... ok
test fetcher::test::state::command::fetch::fetch_queue_rejected_capacity_reached ... ok
test fetcher::test::queue::properties::merge::does_not_increase_queue_length ... ok
test fetcher::test::state::command::fetch::fetch_queue_merges_already_queued ... ok
test fetcher::test::state::command::fetch::fetch_same_repo_different_nodes_queues_second ... ok
test fetcher::test::state::command::fetch::fetch_start_first_fetch_for_node ... ok
test fetcher::test::state::command::fetch::fetch_same_repo_different_refs_enqueues ... ok
test fetcher::test::state::command::fetched::complete_one_of_multiple ... ok
test fetcher::test::state::command::fetched::complete_single_ongoing ... ok
test fetcher::test::state::command::fetched::non_existent_returns_not_found ... ok
test fetcher::test::state::command::fetched::complete_then_dequeue_fifo ... ok
test fetcher::test::state::concurrent::fetched_then_cancel ... ok
test fetcher::test::state::concurrent::interleaved_operations ... ok
test fetcher::test::state::config::min_queue_size ... ok
test fetcher::test::state::dequeue::empty_queue_returns_none ... ok
test fetcher::test::state::dequeue::cannot_dequeue_while_node_at_capacity ... ok
test fetcher::test::state::invariant::queue_integrity_after_merge ... ok
test fetcher::test::queue::properties::merge::empty_refs_fetches_all ... ok
test fetcher::test::state::dequeue::maintains_fifo_order ... ok
test service::filter::test::compatible ... ok
test service::filter::test::test_parameters ... ok
test fetcher::test::state::multinode::independent_queues ... ok
test service::gossip::store::test::test_announced ... ok
test service::filter::test::test_sizes ... ok
test service::limiter::test::test_limiter_multi ... ok
test service::limiter::test::test_limiter_different_rates ... ok
test service::limiter::test::test_limiter_refill ... ok
test service::message::tests::test_inventory_limit ... ok
test fetcher::test::state::multinode::high_count ... ok
test fetcher::test::state::config::high_concurrency ... ok
test service::message::tests::test_ref_remote_limit ... ok
test wire::frame::test::test_stream_id ... ok
test wire::frame::test::test_encode_git_large ... ok
test wire::message::tests::prop_roundtrip_address ... ok
test service::message::tests::prop_refs_announcement_signing ... ok
test wire::message::tests::prop_zero_bytes_encode_decode ... ok
test wire::message::tests::test_inv_ann_max_size ... ok
test wire::message::tests::test_node_ann_max_size ... ok
test wire::message::tests::test_ping_encode_size_overflow - should panic ... ok
test wire::message::tests::test_pingpong_encode_max_size ... ok
test wire::message::tests::test_pong_encode_size_overflow - should panic ... ok
test wire::message::tests::prop_roundtrip_message ... ok
test wire::tests::prop_oid ... ok
test wire::tests::prop_roundtrip_filter ... ok
test wire::tests::prop_roundtrip_publickey ... ok
test wire::tests::prop_roundtrip_refs ... ok
test wire::tests::prop_roundtrip_repoid ... ok
test wire::message::tests::test_refs_ann_max_size ... ok
test wire::tests::prop_roundtrip_tuple ... ok
test wire::tests::prop_roundtrip_u16 ... ok
test wire::tests::prop_roundtrip_u32 ... ok
test wire::tests::prop_roundtrip_u64 ... ok
test wire::tests::prop_roundtrip_vec ... ok
test wire::tests::prop_signature ... ok
test wire::tests::prop_string ... ok
test wire::tests::test_alias ... ok
test wire::tests::test_bounded_vec_limit ... ok
test wire::tests::test_filter_invalid ... ok
test wire::tests::test_string ... ok
test wire::varint::test::prop_roundtrip_varint ... ok
test wire::varint::test::test_encode_overflow - should panic ... ok
test wire::varint::test::test_encoding ... ok
test wire::tests::prop_roundtrip_signed_refs ... ok
test wire::message::tests::prop_message_decoder ... ok
test service::message::tests::test_node_announcement_validate ... ok
test result: ok. 100 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.75s
Running unittests src/main.rs (target/debug/deps/git_remote_rad-879d204374147905)
running 12 tests
test protocol::tests::test_capabilities ... ok
test protocol::tests::test_empty ... ok
test protocol::tests::test_fetch ... ok
test protocol::tests::test_fetch_whitespace ... ok
test protocol::tests::test_invalid ... ok
test protocol::tests::test_list_for_push ... ok
test protocol::tests::test_option ... ok
test protocol::tests::test_option_whitespace_preservation ... ok
test protocol::tests::test_list ... ok
test protocol::tests::test_push ... ok
test protocol::tests::test_push_delete ... ok
test protocol::tests::test_push_force ... ok
test result: ok. 12 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/main.rs (target/debug/deps/radicle_schemars-2c05d8a3e9b64717)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_signals-1a2ca7fd33a640da)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_ssh-9f14aadafa88ba9c)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_systemd-e2cf2d080022d36d)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_term-0b9f55c733b570cc)
running 21 tests
test cell::test::test_width ... ok
test ansi::tests::wrapping ... ok
test ansi::tests::colors_enabled ... ok
test element::test::test_spaced ... ok
test table::test::test_table ... ok
test element::test::test_truncate ... ok
test element::test::test_width ... ok
test ansi::tests::colors_disabled ... ok
test table::test::test_table_border ... ok
test table::test::test_table_border_maximized ... ok
test table::test::test_table_truncate ... ok
test table::test::test_table_unicode ... ok
test table::test::test_table_unicode_truncate ... ok
test table::test::test_truncate ... ok
test table::test::test_table_border_truncated ... ok
test textarea::test::test_wrapping_code_block ... ok
test textarea::test::test_wrapping ... ok
test textarea::test::test_wrapping_fenced_block ... ok
test vstack::test::test_vstack ... ok
test vstack::test::test_vstack_maximize ... ok
test textarea::test::test_wrapping_paragraphs ... ok
test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running unittests src/lib.rs (target/debug/deps/radicle_windows-2c067555aa9e0165)
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle
running 1 test
test crates/radicle/src/cob/patch/encoding/review.rs - cob::patch::encoding::review::Review (line 23) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cli
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cli_test
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_cob
running 1 test
test crates/radicle-cob/src/backend/stable.rs - backend::stable::with_advanced_timestamp (line 56) ... ignored
test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_core
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_crypto
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_dag
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_fetch
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_git_metadata
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_git_ref_format
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_localtime
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_node
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_oid
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_protocol
running 6 tests
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::max (line 96) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::truncate (line 50) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::push (line 122) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::collect_from (line 30) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::unbound (line 149) ... ok
test crates/radicle-protocol/src/bounded.rs - bounded::BoundedVec<T,N>::with_capacity (line 66) ... ok
test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s
Doc-tests radicle_signals
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_ssh
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_systemd
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Doc-tests radicle_term
running 1 test
test crates/radicle-term/src/table.rs - table (line 4) ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.16s
Doc-tests radicle_windows
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
error: 1 target failed:
`-p radicle-cli --test commands`
Exit code: 101
{
"response": "finished",
"result": "failure"
}