Hiredis Compat Functional Tests
Test Matrix
Section titled “Test Matrix”Functional coverage should include:
- basic command roundtrips
- binary-safe payloads
- pipelined commands
- transaction flows
- reconnect/error-path behavior
- DB selection and connection-scoped state
- Pub/Sub subscribe/pattern/unsubscribe flows
Transport matrix should include:
- forced WS mode
- forced HTTP mode
- auto mode with fallback
- direct bypass mode
Expected Output Shape
Section titled “Expected Output Shape”For raw compat command paths, responses should be RESP-framed bytes.
Examples:
- success:
+OK\r\n - bulk:
$5\r\nvalue\r\n - integer:
:1\r\n - error:
-ERR ...\r\n
Failure Interpretation
Section titled “Failure Interpretation”Common failure classes:
- ACL/auth denial
- invalid RESP framing
- session expiry due to TTL
- compat pipeline command-limit exceeded
- upstream Redis unavailability
Where to Run
Section titled “Where to Run”Use the repository test targets plus dedicated compat suites as they are added.
Compatibility command targets:
cargo test -p redis-web --test integration_hiredis_compat_testmake test_hiredis_compat_fixtureThese tests cover:
- session creation and command roundtrips
- Pub/Sub subscribe/unsubscribe stream behavior
- session lifecycle cleanup and CI harness retry behavior