diff options
author | Sean King <seanking2919@protonmail.com> | 2022-12-18 22:03:48 -0700 |
---|---|---|
committer | Sean King <seanking2919@protonmail.com> | 2022-12-18 22:03:48 -0700 |
commit | 60df2d8a97325367a1ad40a30fd072f5dc1e805c (patch) | |
tree | 500d7ffb3b7c3359b486011085d8fb1a56a2ca5d /restarter/lib | |
parent | 2d7ea263a1f7dba8e0a7667a95ea8af110e9be27 (diff) | |
parent | 8db82932a7998d411fa86d53b66f540714f465f3 (diff) | |
download | pleroma-60df2d8a97325367a1ad40a30fd072f5dc1e805c.tar.gz pleroma-60df2d8a97325367a1ad40a30fd072f5dc1e805c.zip |
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into fine_grained_moderation_privileges
Diffstat (limited to 'restarter/lib')
-rw-r--r-- | restarter/lib/pleroma.ex | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/restarter/lib/pleroma.ex b/restarter/lib/pleroma.ex index 149a569ce..a7186cec4 100644 --- a/restarter/lib/pleroma.ex +++ b/restarter/lib/pleroma.ex @@ -61,6 +61,12 @@ defmodule Restarter.Pleroma do {:noreply, @init_state} end + # Don't actually restart during tests. + # We just check if the correct call has been done. + # If we actually restart, we get errors during the tests like + # (RuntimeError) could not lookup Ecto repo Pleroma.Repo because it was not started or + # it does not exist + # See tests in Pleroma.Config.TransferTaskTest def handle_cast({:restart, :test, _}, state) do Logger.debug("pleroma manually restarted") {:noreply, Map.put(state, :need_reboot, false)} @@ -74,6 +80,12 @@ defmodule Restarter.Pleroma do def handle_cast({:after_boot, _}, %{after_boot: true} = state), do: {:noreply, state} + # Don't actually restart during tests. + # We just check if the correct call has been done. + # If we actually restart, we get errors during the tests like + # (RuntimeError) could not lookup Ecto repo Pleroma.Repo because it was not started or + # it does not exist + # See tests in Pleroma.Config.TransferTaskTest def handle_cast({:after_boot, :test}, state) do Logger.debug("pleroma restarted after boot") state = %{state | after_boot: true, rebooted: true} |