Add save-slice-backed runtime fixtures

This commit is contained in:
Jan Petykiewicz 2026-04-14 20:51:27 -07:00
commit 8ca65cbbfb
12 changed files with 974 additions and 47 deletions

View file

@ -70,6 +70,10 @@ pub struct ExpectedRuntimeSummary {
#[serde(default)]
pub packed_event_imported_runtime_record_count: Option<usize>,
#[serde(default)]
pub packed_event_parity_only_record_count: Option<usize>,
#[serde(default)]
pub packed_event_unsupported_record_count: Option<usize>,
#[serde(default)]
pub event_runtime_record_count: Option<usize>,
#[serde(default)]
pub candidate_availability_count: Option<usize>,
@ -341,6 +345,22 @@ impl ExpectedRuntimeSummary {
));
}
}
if let Some(count) = self.packed_event_parity_only_record_count {
if actual.packed_event_parity_only_record_count != count {
mismatches.push(format!(
"packed_event_parity_only_record_count mismatch: expected {count}, got {}",
actual.packed_event_parity_only_record_count
));
}
}
if let Some(count) = self.packed_event_unsupported_record_count {
if actual.packed_event_unsupported_record_count != count {
mismatches.push(format!(
"packed_event_unsupported_record_count mismatch: expected {count}, got {}",
actual.packed_event_unsupported_record_count
));
}
}
if let Some(count) = self.event_runtime_record_count {
if actual.event_runtime_record_count != count {
mismatches.push(format!(
@ -510,6 +530,7 @@ pub struct FixtureDocument {
pub enum FixtureStateOrigin {
Inline,
SnapshotPath(String),
SaveSlicePath(String),
}
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
@ -523,6 +544,8 @@ pub struct RawFixtureDocument {
#[serde(default)]
pub state_snapshot_path: Option<String>,
#[serde(default)]
pub state_save_slice_path: Option<String>,
#[serde(default)]
pub commands: Vec<StepCommand>,
#[serde(default)]
pub expected_summary: ExpectedRuntimeSummary,