mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-21 12:13:55 +09:00
test(observability-proxy): pin the metrics concurrency Retry-After value
The metrics concurrency 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. Assisted-by: LLM Signed-off-by: ZverGuy <maximbel2003@gmail.com>
This commit is contained in:
1 parent
3a5bcf2567
commit
d2feb9b7c2
1 file changed
+2
-2
@@ -187,8 +187,8 @@ func TestServerMetricsConcurrency(t *testing.T) {
|
||||
}()
|
||||
select {
|
||||
case got := <-refused:
|
||||
if got.StatusCode != http.StatusTooManyRequests || got.Header.Get("Retry-After") == "" {
|
||||
t.Fatalf("concurrent request answered %d with Retry-After %q, want 429 with a value", got.StatusCode, got.Header.Get("Retry-After"))
|
||||
if got.StatusCode != http.StatusTooManyRequests || got.Header.Get("Retry-After") != "1" {
|
||||
t.Fatalf("concurrent request answered %d with Retry-After %q, want 429 with 1", got.StatusCode, got.Header.Get("Retry-After"))
|
||||
}
|
||||
case <-time.After(2 * time.Second):
|
||||
t.Fatal("concurrent request of the same user reached the upstream")
|
||||
|
||||
Reference in new issue
Block a user