From 8eceba35b7e7a3e4c9edf39508f51d8fc14e1920 Mon Sep 17 00:00:00 2001 From: mhx Date: Sat, 25 Jul 2026 21:11:42 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20test(e2e/redis):=20fix=20swapped?= =?UTF-8?q?=20IP=E2=86=92verdict=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mock returns "f" (not banned) for 1.2.3.4 and "t" (banned) for 1.2.3.5, and the run.sh assertions match that. Both doc comments described the opposite mapping; correct them to match the code. Co-Authored-By: Claude Opus 4.8 (1M context) --- tests/e2e/mock/mocklapi/main.go | 2 +- tests/e2e/mock/scenarios/redis/run.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/mock/mocklapi/main.go b/tests/e2e/mock/mocklapi/main.go index 320a5df..171725f 100644 --- a/tests/e2e/mock/mocklapi/main.go +++ b/tests/e2e/mock/mocklapi/main.go @@ -52,7 +52,7 @@ func list(m map[string]Decision) []Decision { // --- Redis mock (inline-command wire format, as spoken by simpleredis) --- // serveRedis is a hardcoded stand-in. Every line is scanned for known IPs: -// 1.2.3.4 → "t", 1.2.3.5 → "f", GET for anything else → miss ($-1). +// 1.2.3.4 → "f", 1.2.3.5 → "t", GET for anything else → miss ($-1). // SET, DEL, AUTH, SELECT get +OK (they don't read the response anyway). func serveRedis(addr string) { ln, err := net.Listen("tcp", addr) diff --git a/tests/e2e/mock/scenarios/redis/run.sh b/tests/e2e/mock/scenarios/redis/run.sh index b1f5806..a4c56eb 100644 --- a/tests/e2e/mock/scenarios/redis/run.sh +++ b/tests/e2e/mock/scenarios/redis/run.sh @@ -7,8 +7,8 @@ source "$HERE/../../lib/common.sh" SCENARIO=redis -# Redis cache check: the mock returns "t" (banned) for 1.2.3.4 and "f" (not -# banned) for 1.2.3.5. All other IPs return a miss, which falls through to the +# Redis cache check: the mock returns "f" (not banned) for 1.2.3.4 and "t" +# (banned) for 1.2.3.5. All other IPs return a miss, which falls through to the # LAPI (no decision → allowed). This proves the plugin reads cached decisions # from Redis correctly. body() {