node: Get the failing fetch tests passing

We fix the failing fetch tests by:

1. Not verifying our own refs, unless we're cloning, since we're
   otherwise not fetching our own refs.
2. Always force-fetching `sigrefs` from remotes into the staging copy.
3. Making sure that sigref updates are fast-forward before transfering
   the remote into the production copy.
This commit is contained in:
Alexis Sellier
2023-05-03 16:16:34 +02:00
parent 1326774d4f
commit 0886ab0a3c
6 changed files with 137 additions and 50 deletions
+6 -1
View File
@@ -612,7 +612,12 @@ fn test_cob_deletion() {
let alice_issues = radicle::cob::issue::Issues::open(&alice_repo).unwrap();
alice_issues.remove(issue_id, &alice.signer).unwrap();
bob.handle.fetch(rid, alice.id).unwrap();
log::debug!(target: "test", "Removing issue..");
radicle::assert_matches!(
bob.handle.fetch(rid, alice.id).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());