huskies: merge 951
This commit is contained in:
@@ -343,10 +343,9 @@ mod stage_migration_tests {
|
||||
|
||||
for (id, _, expected_variant) in cases {
|
||||
let view = read_item(id).expect("item must still exist after migration");
|
||||
let projected: Stage = crate::pipeline_state::project_stage(&view)
|
||||
.expect("projection must succeed after migration");
|
||||
let projected: &Stage = view.stage();
|
||||
assert_eq!(
|
||||
std::mem::discriminant(&projected),
|
||||
std::mem::discriminant(projected),
|
||||
std::mem::discriminant(expected_variant),
|
||||
"stage for {id} should project to {expected_variant:?} after migration, got {projected:?}",
|
||||
);
|
||||
@@ -367,7 +366,7 @@ mod stage_migration_tests {
|
||||
|
||||
let after = read_item(story_id).expect("item must still exist after migration");
|
||||
assert!(
|
||||
matches!(after.stage(), crate::crdt_state::Stage::Backlog),
|
||||
matches!(after.stage(), crate::pipeline_state::Stage::Backlog),
|
||||
"7_frozen should collapse to Backlog: got {:?}",
|
||||
after.stage()
|
||||
);
|
||||
@@ -400,8 +399,14 @@ mod stage_migration_tests {
|
||||
// Clean item is unchanged; legacy item is now clean too.
|
||||
let clean = read_item("9520_already_clean").unwrap();
|
||||
let migrated = read_item("9521_needs_migration").unwrap();
|
||||
assert!(matches!(clean.stage(), crate::crdt_state::Stage::Coding));
|
||||
assert!(matches!(migrated.stage(), crate::crdt_state::Stage::Coding));
|
||||
assert!(matches!(
|
||||
clean.stage(),
|
||||
crate::pipeline_state::Stage::Coding
|
||||
));
|
||||
assert!(matches!(
|
||||
migrated.stage(),
|
||||
crate::pipeline_state::Stage::Coding
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -413,7 +418,7 @@ mod stage_migration_tests {
|
||||
let after_first = read_item("9530_idempotent").unwrap();
|
||||
assert!(matches!(
|
||||
after_first.stage(),
|
||||
crate::crdt_state::Stage::Merge
|
||||
crate::pipeline_state::Stage::Merge { .. }
|
||||
));
|
||||
|
||||
// Second call must be a no-op — the filter pass returns empty.
|
||||
@@ -421,7 +426,7 @@ mod stage_migration_tests {
|
||||
let after_second = read_item("9530_idempotent").unwrap();
|
||||
assert!(matches!(
|
||||
after_second.stage(),
|
||||
crate::crdt_state::Stage::Merge
|
||||
crate::pipeline_state::Stage::Merge { .. }
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user