mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-22 02:50:39 +08:00
cli/tests: Wait for seed discovery after clone
`git_push_canonical` clones the repository as Bob and then immediately runs `git push` as Alice, expecting "Synced with 1 seed(s)". `clone` announces Bob's inventory, but Alice only treats Bob as a seed after that announcement is applied to her routing table. On a slower host the reactor can still be busy when Alice looks up seeds, so she reports "No seeds found". Wait until Alice's routing table contains Bob for the repository before pushing. Apply the same wait to the lightweight-tags variant, which uses the same setup. Signed-off-by: Xeonacid <h.dwwwwww@gmail.com>
This commit is contained in:
@@ -282,6 +282,8 @@ fn git_push_canonical_lightweight_tags() {
|
||||
|
||||
bob.connect(&alice).converge([&alice]);
|
||||
bob.clone(rid, environment.work(&bob)).unwrap();
|
||||
// Alice must see Bob as a seed before `git push` tries to sync.
|
||||
alice.routes_to(&[(rid, bob.id)]);
|
||||
formula(
|
||||
&environment.tempdir(),
|
||||
"examples/git/git-push-canonical-lightweight-tags.md",
|
||||
@@ -328,6 +330,8 @@ fn git_push_canonical() {
|
||||
|
||||
bob.connect(&alice).converge([&alice]);
|
||||
bob.clone(rid, environment.work(&bob)).unwrap();
|
||||
// Alice must see Bob as a seed before `git push` tries to sync.
|
||||
alice.routes_to(&[(rid, bob.id)]);
|
||||
formula(
|
||||
&environment.tempdir(),
|
||||
"examples/git/git-push-canonical-annotated-tags.md",
|
||||
|
||||
Reference in New Issue
Block a user