-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backend rate limit tests are failing #879
Comments
is this being worked on? If not I could get this done |
Would be great if you can tackle this @thesarfo. Let me know if you need any help. |
I don't have much experience to start with. But when I run the tests locally everything is passing. It's just that I had to change the name of the environment file to ".env" instead of ".env.dev" (and adjust the databases connection variables like server and host etc). With ".env.dev" it was not able to detect the "SECRET_KEY" and was throwing --> django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. |
@prajguru54 thanks for checking :). I removed the tests a while ago. In order to avoid failing GitHun Actions, but forgot to add a comment here. The last change to the test was made in the commit The test should check the rate limits for logged-in users and anom users. |
@prajguru54 or @thesarfo, would either of you want to reimplement them? |
yes, I would want to do that. but @prajguru54 can take it if he feels up to it |
You're assigned, @thesarfo, so by all means feel free to send something along :) Let us know if you'd like some ideas or support! |
@andrewtavis , I will be glad to take this. Already started on it. @thesarfo Have you also started as well?? |
Hey all 👋 Checking in post a busy last month on my end. Hope all are well :) We're still looking for the tests that were removed to be re-implemented. @thesarfo or @prajguru54: Do either of you have interest? |
@andrewtavis I’ve been going through the codebase to locate the rate-limiting functionality but haven’t been able to pin it down yet. I’m keen to write the tests for it, could you point me in the right direction? |
CC @to-sta who might have a bit better of an opinion on how to implement this? :) |
Hi @thesarfo, the functionality comes from DRF, here are the docs. We have set default values users and anons in settings.py. For your test you could also overwrite those settings and test against that 🙂. You can test the rate limiting yourself via SwaggerUI. For that you need to run the backend container and go to http://localhost:8000/v1/schema/swagger-ui/ |
Terms
Behavior
Our rate limit tests are currently failing, but the rate limiting functionality is working correctly. I have manually tested it using SwaggerUI.
The text was updated successfully, but these errors were encountered: