summaryrefslogtreecommitdiff
path: root/test/support/channel_case.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-12-26 10:26:35 +0000
committerlain <lain@soykaf.club>2020-12-26 10:26:35 +0000
commite4f1d8f48c85b8a388d6c3945db157de5ce588c5 (patch)
tree3a3da119eb71a0536bd5f23226834dfea634d74a /test/support/channel_case.ex
parent88530c02d60900d1e0920d50c6c081a59010ea09 (diff)
parentfecefe68f88014ad2f8b5f290f3b0c7692fa3fef (diff)
downloadpleroma-e4f1d8f48c85b8a388d6c3945db157de5ce588c5.tar.gz
pleroma-e4f1d8f48c85b8a388d6c3945db157de5ce588c5.zip
Merge branch 'cachex-test' into 'develop'
Test framework overhaul (speed, reliability) See merge request pleroma/pleroma!3209
Diffstat (limited to 'test/support/channel_case.ex')
-rw-r--r--test/support/channel_case.ex8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/support/channel_case.ex b/test/support/channel_case.ex
index 114184a9f..f4696adb3 100644
--- a/test/support/channel_case.ex
+++ b/test/support/channel_case.ex
@@ -33,8 +33,14 @@ defmodule Pleroma.Web.ChannelCase do
setup tags do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo)
- unless tags[:async] do
+ if tags[:async] do
+ Mox.stub_with(Pleroma.CachexMock, Pleroma.NullCache)
+ Mox.set_mox_private()
+ else
Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, {:shared, self()})
+ Mox.stub_with(Pleroma.CachexMock, Pleroma.CachexProxy)
+ Mox.set_mox_global()
+ Pleroma.DataCase.clear_cachex()
end
:ok