fix(store): verify restored story snapshots
This commit is contained in:
@@ -339,6 +339,9 @@ fn map_store_error(error: StoreError) -> TurnFailure {
|
||||
StoreError::NodeAlreadyExists(_)
|
||||
| StoreError::ParentNotFound(_)
|
||||
| StoreError::StateMismatch(_)
|
||||
| StoreError::StateHashMismatch { .. }
|
||||
| StoreError::Sqlite(_)
|
||||
| StoreError::Serialization(_)
|
||||
| StoreError::Poisoned => internal_failure("turn could not be committed"),
|
||||
}
|
||||
}
|
||||
@@ -816,7 +819,8 @@ mod persistent_turn_tests {
|
||||
user_input: String::new(),
|
||||
beats: Vec::new(),
|
||||
delta: StateDelta { ops: Vec::new() },
|
||||
state_hash: format!("hash_{id}"),
|
||||
state_hash: hash_runtime_state(&state(id, branch))
|
||||
.expect("serializable test state"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user