pleroma/test/pleroma/web/plugs
Ilja 26080b4b5c Fix rate_limiter_test.exs test "it restricts based on config values"
It used a timer to sleep.
But time also goes on when doing other things, so depending on hardware, the timings could be off.
I slightly changed the tests so we still test what we functionally want.
Instead of waiting until the cache expires I now have a function to expire the test and use that.

That means we're not testing any more if the cache really expires after a certain amount of time,
but that's the responsability of the dependency imo, so shouldn't be a problem.

I also changed `Pleroma.Web.Endpoint, :http, :ip` to `127.0.0.1` because that's the setting people typically have,
and I see no reason to do it differently.
Especially since it's an exernal ip, which may come over as weird or suspicious to people.
2022-07-09 07:19:18 +02:00
..
admin_secret_authentication_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
authentication_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
basic_auth_decoder_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
cache_control_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
cache_test.exs Allow to skip cache in Cache plug 2022-05-06 10:23:26 +02:00
digest_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
ensure_authenticated_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
ensure_public_or_authenticated_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
ensure_staff_privileged_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
ensure_user_token_assigns_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
federating_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
frontend_static_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
http_security_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
http_signature_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
idempotency_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
instance_static_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
mapped_signature_to_identity_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
o_auth_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
o_auth_scopes_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
plug_helper_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
rate_limiter_test.exs Fix rate_limiter_test.exs test "it restricts based on config values" 2022-07-09 07:19:18 +02:00
remote_ip_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
set_format_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
set_locale_plug_test.exs Merge branch 'from/upstream-develop/tusooa/translate-pages' into 'develop' 2022-03-20 18:14:37 +00:00
set_user_session_id_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
uploaded_media_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
user_enabled_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
user_fetcher_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
user_is_admin_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
user_is_staff_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00
user_tracking_plug_test.exs Copyright bump for 2022 2022-02-25 23:11:42 -07:00