mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-12 23:54:01 +09:00
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 <maximbel2003@gmail.com>
This commit is contained in:
1 parent
1004f2f2d8
commit
5db02ab47e
2 files changed
+3
-3
No files matched your search
@@ -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},
|
||||
|
||||
@@ -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"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user