projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removing trailing space on empty line in OAuth controller
[akkoma]
/
test
/
support
/
data_case.ex
diff --git
a/test/support/data_case.ex
b/test/support/data_case.ex
index 1f33450e63da80b466b6b3bfd7224e8753f1ae82..0ee2aa4a23204da337cef9d7e6ce9a573e11ff96 100644
(file)
--- a/
test/support/data_case.ex
+++ b/
test/support/data_case.ex
@@
-64,7
+64,7
@@
defmodule Pleroma.DataCase do
end)
end
end)
end
-
setup tags
do
+
def setup_multi_process_mode(tags)
do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo)
if tags[:async] do
:ok = Ecto.Adapters.SQL.Sandbox.checkout(Pleroma.Repo)
if tags[:async] do
@@
-72,11
+72,16
@@
defmodule Pleroma.DataCase do
Mox.set_mox_private()
else
Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, {:shared, self()})
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()
Mox.set_mox_global()
+ Mox.stub_with(Pleroma.CachexMock, Pleroma.CachexProxy)
clear_cachex()
end
clear_cachex()
end
+ :ok
+ end
+
+ def setup_streamer(tags) do
if tags[:needs_streamer] do
start_supervised(%{
id: Pleroma.Web.Streamer.registry(),
if tags[:needs_streamer] do
start_supervised(%{
id: Pleroma.Web.Streamer.registry(),
@@
-85,6
+90,12
@@
defmodule Pleroma.DataCase do
})
end
})
end
+ :ok
+ end
+
+ setup tags do
+ setup_multi_process_mode(tags)
+ setup_streamer(tags)
stub_pipeline()
Mox.verify_on_exit!()
stub_pipeline()
Mox.verify_on_exit!()