cultmesh-rs tests: answer a subscribe by editing the vector's snapshot
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
bc861a45af
commit
61381338ac
1 changed files with 5 additions and 7 deletions
|
|
@ -171,13 +171,11 @@ fn vector_selection() -> Selection {
|
|||
}
|
||||
|
||||
/// The vector's snapshot, answering `message_id`.
|
||||
fn snapshot_answering(message_id: &str) -> CultNetMessage {
|
||||
match decode(&session()[1]) {
|
||||
CultNetMessage::SnapshotResponseRawV1 { matched, as_of, next, headers, documents, .. } => {
|
||||
CultNetMessage::SnapshotResponseRawV1 { message_id: message_id.into(), matched, as_of, next, headers, documents }
|
||||
}
|
||||
other => panic!("{other:?}"),
|
||||
}
|
||||
fn snapshot_answering(answered: &str) -> CultNetMessage {
|
||||
let mut message = decode(&session()[1]);
|
||||
let CultNetMessage::SnapshotResponseRawV1 { message_id, .. } = &mut message else { panic!("{message:?}") };
|
||||
*message_id = answered.into();
|
||||
message
|
||||
}
|
||||
|
||||
fn change_part(message_id: &str, subscription: &str, commit: &str) -> CultNetMessage {
|
||||
|
|
|
|||
Loading…
Reference in a new issue