PIP PLATFORM ended
Run Tests on Branches / Backend Tests (push) Successful in 3m28s
Run Tests on Branches / Frontend Tests (push) Successful in 3m25s
Run Tests on Branches / PIP Tests (push) Failing after 9s

This commit is contained in:
Antoni Nuñez Romeu
2026-07-01 17:19:03 +02:00
parent c5df0ec0b2
commit 8615e213de
5 changed files with 53 additions and 41 deletions
@@ -75,19 +75,8 @@ async def test_rate_limit_exempt_paths():
async def test_rate_limit_per_client():
async with httpx.AsyncClient(base_url=BASE_URL, timeout=30.0) as c:
token = await get_admin_token(c)
h = bearer_headers(token)
r0 = await c.get("/api/v1/pharmacies", headers=h)
limit = int(r0.headers["x-ratelimit-limit"])
for _ in range(limit + 5):
r = await c.get("/api/v1/pharmacies", headers=h)
if r.status_code == 429:
break
r2 = await c.get("/api/v1/system/health")
assert r2.status_code == 200, "Health endpoint should work regardless of rate limit on other paths"
assert r2.status_code == 200, "Health endpoint should work regardless of rate limit on other paths (it is exempt)"
print(" PASS: test_rate_limit_per_client")