commit ea908f577b6b5a2e98169ddd535a5d68b2b0d1ad
parent b5a0c5fade59ba4eb0c7165ccfcdb3f5ac383548
Author: triesap <tyson@radroots.org>
Date: Fri, 6 Mar 2026 16:18:17 +0000
replica-sync: cover fallback relation paths in emit and roundtrip
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/crates/replica-sync/src/emit.rs b/crates/replica-sync/src/emit.rs
@@ -1777,6 +1777,11 @@ mod tests {
.is_some()
);
assert!(
+ load_relation_by_role(&pass, &farm_row.id, "", RelationType::Farm)
+ .expect("farm fallback relation")
+ .is_some()
+ );
+ assert!(
load_relation_by_role(&pass, &plot_secondary.id, "", RelationType::Plot)
.expect("plot fallback relation")
.is_some()
diff --git a/crates/replica-sync/tests/ingest_roundtrip.rs b/crates/replica-sync/tests/ingest_roundtrip.rs
@@ -243,7 +243,7 @@ fn seed_source(
&IPlotGcsLocationFields {
plot_id: plot_row_secondary.id.clone(),
gcs_location_id: gcs_row.id.clone(),
- role: "primary".to_string(),
+ role: "secondary".to_string(),
},
),
"plot_secondary_gcs",