akkoma/test
ilja f1dfd76b98 Fix rate_limiter_test.exs test "it restricts based on config values" (#233)
Fixes one of the 'erratic' tests

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` in the tests to `127.0.0.1`
Currently it was set to 8.8.8.8, but I see no reason for that and, while I assume that no calls
are made to it, it may come over as weird or suspicious to people.

Co-authored-by: Ilja <ilja@ilja.space>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/233
Co-authored-by: ilja <akkoma.dev@ilja.space>
Co-committed-by: ilja <akkoma.dev@ilja.space>
2022-11-01 14:25:54 +00:00
..
config remove default emoji file 2022-08-11 19:05:41 +01:00
credo/check/consistency Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
fixtures Use set of pregenerated RSA keys 2022-09-11 20:14:58 +01:00
instance_static support for special chars in pack name 2020-09-24 09:12:37 +03:00
mix Don't persist local undone follow (#194) 2022-08-31 18:00:36 +00:00
pleroma Fix rate_limiter_test.exs test "it restricts based on config values" (#233) 2022-11-01 14:25:54 +00:00
support Backend settings sync (#226) 2022-10-06 16:22:15 +00:00
test_helper.exs Use finch everywhere (#33) 2022-07-04 16:30:38 +00:00