commit 3dea57b9ef41de982d68402d92bbc59642cfb869
parent 61e1b8a3f5a502bce2d6f2d86eb1cb8629903cc0
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",