Update limit core tests to avoid false positive

This commit is contained in:
Théophile Diot 2023-06-12 18:35:24 -04:00
parent 16a1916dbb
commit 855ae89363
No known key found for this signature in database
GPG Key ID: E752C80DB72BB014
1 changed files with 2 additions and 2 deletions

View File

@ -112,7 +112,7 @@ try:
flush=True,
)
exit(0)
elif request_number != int(limit_req_rate[:-3]) + 1:
elif request_number < int(limit_req_rate[:-3]) + 1:
print(
f"❌ The limit_req directive is not working correctly, {request_number} requests were made in {total:.2f}s while the limit was set to {limit_req_rate}, exiting ...",
flush=True,
@ -159,7 +159,7 @@ try:
flush=True,
)
exit(1)
elif request_number != int(limit_req_rate_1[:-3]) + 1:
elif request_number < int(limit_req_rate_1[:-3]) + 1:
print(
f"❌ The limit_req_1 directive is not working correctly, {request_number} requests were made in {total:.2f}s while the limit was set to {limit_req_rate}, exiting ...",
flush=True,