From 5db02ab47e623156b59137ca545864aa99679924 Mon Sep 17 00:00:00 2001 From: ZverGuy Date: Thu, 5 Nov 2026 01:44:29 +0700 Subject: [PATCH] test(observability-proxy): pin the concurrency Retry-After value The test only checked that a Retry-After was present, while the rate limit test pins its value, so a change to the promised hint passed. It now expects the literal value. The note on the empty fields_limit case now gives the reason it is refused. Assisted-by: LLM Signed-off-by: ZverGuy --- internal/observabilityproxy/logsparams_test.go | 2 +- internal/observabilityproxy/server_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/observabilityproxy/logsparams_test.go b/internal/observabilityproxy/logsparams_test.go index f39cc8846..009b1721d 100644 --- a/internal/observabilityproxy/logsparams_test.go +++ b/internal/observabilityproxy/logsparams_test.go @@ -116,7 +116,7 @@ func TestBuildLogsParamsRejects(t *testing.T) { code int }{ {"unknown endpoint", "tenant_ids", url.Values{}, http.StatusNotFound}, - // vlselect reads fields_limit=0 as no limit on the groups. + // Malformed rather than a request for the default. {"empty fields_limit", "hits", url.Values{"field": {"level"}, "fields_limit": {""}}, http.StatusBadRequest}, {"stats_query is not proxied", "stats_query", url.Values{}, http.StatusNotFound}, {"ignore_global_time_filter", "query", url.Values{"query": {`* options(ignore_global_time_filter=true)`}}, http.StatusBadRequest}, diff --git a/internal/observabilityproxy/server_test.go b/internal/observabilityproxy/server_test.go index a5a9ee2d8..df3e23bc4 100644 --- a/internal/observabilityproxy/server_test.go +++ b/internal/observabilityproxy/server_test.go @@ -488,8 +488,8 @@ func TestServerConcurrencyRetryAfter(t *testing.T) { defer func() { _ = first.Body.Close() }() second := h.do(http.MethodGet, logsRoot+endpoint, "good", nil, nil) _ = second.Body.Close() - if second.StatusCode != http.StatusTooManyRequests || second.Header.Get("Retry-After") == "" { - t.Errorf("%s over the limit answered %d with Retry-After %q, want 429 with a value", + if second.StatusCode != http.StatusTooManyRequests || second.Header.Get("Retry-After") != "1" { + t.Errorf("%s over the limit answered %d with Retry-After %q, want 429 with 1", endpoint, second.StatusCode, second.Header.Get("Retry-After")) } }