From 9ff9f23a8fb9930e4dff7d7a4b98a86ae35b2dbe Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 19 Nov 2026 19:15:26 +0000 Subject: [PATCH] sww: keep the stop cut-off test within funlen's 80 lines On next, TestRProxyStoppingCutsOffARequestAfterFiveSeconds is at the limit, and this PR's reformatting of the stand-in's answer adds a line, so the linter fails on the merged tree. The test now uses the file's rproxyUpstreamURL instead of declaring the same setting name again. Model: opus-5-5 --- internal/sww/rproxy_test.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/internal/sww/rproxy_test.go b/internal/sww/rproxy_test.go index 832a4bc..6dd4b70 100644 --- a/internal/sww/rproxy_test.go +++ b/internal/sww/rproxy_test.go @@ -787,10 +787,7 @@ func sendAndKeepOpen(t *testing.T, addr, request string) net.Conn { func TestRProxyStoppingCutsOffARequestAfterFiveSeconds(t *testing.T) { t.Parallel() - const ( - cutOffAfter = 5 * time.Second - upstreamSetting = "SWW_RPROXY_UPSTREAM_URL" - ) + const cutOffAfter = 5 * time.Second asked := make(chan struct{}) release := make(chan struct{}) @@ -813,9 +810,9 @@ func TestRProxyStoppingCutsOffARequestAfterFiveSeconds(t *testing.T) { defer stop() env := map[string]string{ - rproxyListenAddr: localhost + ":0", - upstreamSetting: app.URL, - wafBackend: backend.URL, + rproxyListenAddr: localhost + ":0", + rproxyUpstreamURL: app.URL, + wafBackend: backend.URL, } out := &output{} exited := make(chan int, 1)