mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-21 18:40:39 +08:00
node: validate production in debug mode
Ensure that the production repository is validated after fetching and performing deletions. This is to highlight any inconsistencies that may show up between fetching and deleting references. Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett
This commit is contained in:
@@ -398,6 +398,16 @@ impl<'a> StagingPhaseFinal<'a> {
|
||||
let head = production.set_identity_head()?;
|
||||
log::debug!(target: "worker", "'refs/rad/id' for {} set to {head}", production.id);
|
||||
|
||||
#[cfg(test)]
|
||||
// N.b. This is to prevent us from shooting ourselves in the
|
||||
// foot with storage inconsistencies.
|
||||
radicle::debug_assert_matches!(
|
||||
production.validate(),
|
||||
Ok(()),
|
||||
"repository {} is not valid",
|
||||
production.id,
|
||||
);
|
||||
|
||||
Ok((updates, remotes))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user