You are browsing as a guest. Sign up (or log in) to start making projects!

2h 0m logged

Add client integration test suite with handshake, streaming, retry, and progress tests

Create 14 integration tests in pwr-cli/tests/client_integration.rs covering
the client-side protocol layer. Handshake tests verify that ClientMessage
frames encode with correct magic bytes, version, and type discriminants,
and that decode_client_message recovers the original Handshake struct with
client_id and nonce intact. Archive flow tests exercise ArchiveRequest and
ArchiveComplete serialization round-trips with all fields including UUID,
name, total_size, file_count, compression, and hash. Restore flow tests
verify RestoreRequest encoding and decoding.

Server response parsing tests validate that HandshakeAck, Error, and
StatusResponse messages are correctly deserialized from framed payloads,
including success flags, error codes, and project info vectors with UUID
and file_count fields. Chunk streaming tests cover five size boundaries
from zero bytes (EOF detection) through 1 MiB, plus standalone EOF marker
encoding. Retry logic tests verify is_retryable_error correctly classifies
connection failures, timeouts, and broken pipes as transient while treating
authentication and not-found errors as fatal. with_retry is tested for
immediate success, maximum retry exhaustion (initial + 3 retries = 4
calls), and early termination on non-retryable errors after 1 call.
A progress stage test confirms all five ArchiveStage variants are distinct.

0
1

Comments 0

No comments yet. Be the first!