diff options
author | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-09-08 16:42:27 +0000 |
---|---|---|
committer | Haelwenn <contact+git.pleroma.social@hacktivis.me> | 2020-09-08 16:42:27 +0000 |
commit | 09416d8a03854e946e681ea65f90fe4f3eca2018 (patch) | |
tree | 79ebc51987ffa0528ef151f8837b976c66de5448 | |
parent | bf048ab72f3b0a994b5d8dd6c82bf30780468173 (diff) | |
parent | 87d2805791e1dd6746009e8c1445719e8cbfd31d (diff) | |
download | pleroma-09416d8a03854e946e681ea65f90fe4f3eca2018.tar.gz |
Merge branch 'bugfix/mock' into 'develop'
mockfix but for non-secteam because gitlab
See merge request pleroma/pleroma!2973
-rw-r--r-- | lib/pleroma/stats.ex | 1 | ||||
-rw-r--r-- | test/plugs/admin_secret_authentication_plug_test.exs | 2 | ||||
-rw-r--r-- | test/plugs/oauth_scopes_plug_test.exs | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/stats.ex b/lib/pleroma/stats.ex index e7f8d272c..e5c9c668b 100644 --- a/lib/pleroma/stats.ex +++ b/lib/pleroma/stats.ex @@ -23,6 +23,7 @@ defmodule Pleroma.Stats do @impl true def init(_args) do + if Pleroma.Config.get(:env) == :test, do: :ok = Ecto.Adapters.SQL.Sandbox.checkout(Repo) {:ok, nil, {:continue, :calculate_stats}} end diff --git a/test/plugs/admin_secret_authentication_plug_test.exs b/test/plugs/admin_secret_authentication_plug_test.exs index 89df03c4b..14094eda8 100644 --- a/test/plugs/admin_secret_authentication_plug_test.exs +++ b/test/plugs/admin_secret_authentication_plug_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Plugs.AdminSecretAuthenticationPlugTest do - use Pleroma.Web.ConnCase, async: true + use Pleroma.Web.ConnCase import Mock import Pleroma.Factory diff --git a/test/plugs/oauth_scopes_plug_test.exs b/test/plugs/oauth_scopes_plug_test.exs index 884de7b4d..334316043 100644 --- a/test/plugs/oauth_scopes_plug_test.exs +++ b/test/plugs/oauth_scopes_plug_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Plugs.OAuthScopesPlugTest do - use Pleroma.Web.ConnCase, async: true + use Pleroma.Web.ConnCase alias Pleroma.Plugs.OAuthScopesPlug alias Pleroma.Repo |