test(peer-cli): add large exact-transfer coverage
Add deeper peer CLI coverage for file-transfer integrity and multi-peer chunking. The alpha fixture now carries a real renamed RAR archive larger than 100 MB for alienswarm, which gives the chunk planner enough work to split a single game archive across multiple peers. Expose completed chunk source details as a peer event and have the CLI print that event as JSONL. This keeps transfer behavior in lanspread-peer while the CLI remains a harness that reports what the peer runtime did. The Tauri shell logs the event at debug level so the shared PeerEvent enum stays exhaustive. Document the new S13/S14 scenarios and record the manual run evidence, including SHA-256 manifests and the per-peer byte split for the large archive. Test Plan: - just fmt - just test - just peer-cli-build - just clippy - just peer-cli-image - unrar t -idq crates/lanspread-peer-cli/fixtures/fixture-alpha/alienswarm/alienswarm.eti - Manual peer CLI: bravo -> deep-small-client bfbc2 download with matching SHA-256 manifests - Manual peer CLI: alpha -> deep-stage-b alienswarm download with matching SHA-256 manifests - Manual peer CLI: alpha + deep-stage-b -> deep-stage-c alienswarm download with chunk events from both peers and matching SHA-256 manifests Refs: PEER_CLI_SCENARIOS.md S13 S14
This commit is contained in:
Binary file not shown.
@@ -390,6 +390,22 @@ async fn update_state_from_event(shared: &SharedState, event: PeerEvent) -> (&'s
|
||||
)
|
||||
}
|
||||
PeerEvent::DownloadGameFilesBegin { id } => ("download-begin", json!({"game_id": id})),
|
||||
PeerEvent::DownloadGameFileChunkFinished {
|
||||
id,
|
||||
peer_addr,
|
||||
relative_path,
|
||||
offset,
|
||||
length,
|
||||
} => (
|
||||
"download-chunk-finished",
|
||||
json!({
|
||||
"game_id": id,
|
||||
"peer_addr": peer_addr.to_string(),
|
||||
"relative_path": relative_path,
|
||||
"offset": offset,
|
||||
"length": length,
|
||||
}),
|
||||
),
|
||||
PeerEvent::DownloadGameFilesFinished { id } => {
|
||||
("download-finished", json!({"game_id": id}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user