Skip to content

Hiredis Compat Functional Tests

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

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

Common failure classes:

  • ACL/auth denial
  • invalid RESP framing
  • session expiry due to TTL
  • compat pipeline command-limit exceeded
  • upstream Redis unavailability

Use the repository test targets plus dedicated compat suites as they are added.

Compatibility command targets:

Terminal window
cargo test -p redis-web --test integration_hiredis_compat_test
make test_hiredis_compat_fixture

These tests cover:

  • session creation and command roundtrips
  • Pub/Sub subscribe/unsubscribe stream behavior
  • session lifecycle cleanup and CI harness retry behavior