Tests: Use NullCache for async tests.
authorlain <lain@soykaf.club>
Fri, 18 Dec 2020 18:49:01 +0000 (19:49 +0100)
committerlain <lain@soykaf.club>
Fri, 18 Dec 2020 18:53:19 +0000 (19:53 +0100)
commit95a9bdfc374a013be47e74b25bdba5d91f51948b
tree8c978c04055f71704ddf6f862effdf9462654a88
parent713612c37725c81b0906b03528c9eaa474816c7d
Tests: Use NullCache for async tests.

Caching can't work in async tests, so for them it is mocked to a
null cache that is always empty. Synchronous tests are stubbed
with the real Cachex, which is emptied after every test.
13 files changed:
config/test.exs
lib/pleroma/emoji/pack.ex
lib/pleroma/web/admin_api/controllers/media_proxy_cache_controller.ex
test/pleroma/reverse_proxy_test.exs
test/pleroma/web/media_proxy/invalidation_test.exs
test/pleroma/web/plugs/idempotency_plug_test.exs
test/support/cachex_proxy.ex [new file with mode: 0644]
test/support/channel_case.ex
test/support/conn_case.ex
test/support/data_case.ex
test/support/mocks.ex [new file with mode: 0644]
test/support/null_cache.ex [new file with mode: 0644]
test/test_helper.exs