cli: Support --seed on rad clone

Allows specifying one or more seeds to clone from. This is useful for
cloning private repositories which are not in the routing table.
This commit is contained in:
cloudhead
2024-01-03 14:07:19 +01:00
parent 150130e99b
commit 04bfbca15d
4 changed files with 129 additions and 13 deletions
+41
View File
@@ -1683,6 +1683,47 @@ fn rad_init_private_clone() {
.unwrap();
}
#[test]
fn rad_init_private_clone_seed() {
let mut environment = Environment::new();
let alice = environment.node(Config::test(Alias::new("alice")));
let bob = environment.node(Config::test(Alias::new("bob")));
let working = environment.tmp().join("working");
fixtures::repository(working.join("alice"));
let alice = alice.spawn();
let mut bob = bob.spawn();
test(
"examples/rad-init-private.md",
working.join("alice"),
Some(&alice.home),
[],
)
.unwrap();
bob.connect(&alice).converge([&alice]);
formula(
&environment.tmp(),
"examples/rad-init-private-clone-seed.md",
)
.unwrap()
.home(
"alice",
working.join("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();