summaryrefslogtreecommitdiff
path: root/test/support/api_spec_helpers.ex
diff options
context:
space:
mode:
authorIlja <ilja@ilja.space>2022-07-08 07:32:47 +0200
committerIlja <ilja@ilja.space>2022-07-09 07:19:18 +0200
commit26080b4b5c9d10887f8c52fbd76cba5b22838632 (patch)
tree3478ea4d69f64e662d66142765cc738c7b5313f6 /test/support/api_spec_helpers.ex
parent29f4ab640b0269fc7751fca7c24cda5be912d1e5 (diff)
downloadpleroma-26080b4b5c9d10887f8c52fbd76cba5b22838632.tar.gz
pleroma-26080b4b5c9d10887f8c52fbd76cba5b22838632.zip
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.
Diffstat (limited to 'test/support/api_spec_helpers.ex')
0 files changed, 0 insertions, 0 deletions