prop/lib/microwaveprop/valkey/redix_adapter.ex
Graham McIntire 89e8bb2267
test: use Mox for Valkey tests without real Redis (55%→88%)
- Create Microwaveprop.Valkey.Adapter behaviour with command/3 + pipeline/3
- Create Microwaveprop.Valkey.RedixAdapter as the production impl
- Inject adapter via Application config; mock with Mox in tests
- Cover all Valkey operations: get, mget, set, mset_with_ttl, zadd,
  zrevrange, zrangebyscore, zrem, del, scan_match (multi-cursor)
- Full round-trip tests for encode/decode, error paths, edge cases

Coverage: 78.93% → 79.07%
2026-05-07 13:48:08 -05:00

14 lines
296 B
Elixir

defmodule Microwaveprop.Valkey.RedixAdapter do
@moduledoc false
@behaviour Microwaveprop.Valkey.Adapter
@impl true
def command(conn, args, opts) do
Redix.command(conn, args, opts)
end
@impl true
def pipeline(conn, cmds, opts) do
Redix.pipeline(conn, cmds, opts)
end
end