From b17c36c45a68b37cc6947e527d06584dca657ee6 Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 21 Dec 2020 12:59:11 +0100 Subject: [PATCH] Tests: More test fixes. --- test/mix/tasks/pleroma/ecto/migrate_test.exs | 2 +- test/mix/tasks/pleroma/instance_test.exs | 6 +++++- test/pleroma/application_requirements_test.exs | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/mix/tasks/pleroma/ecto/migrate_test.exs b/test/mix/tasks/pleroma/ecto/migrate_test.exs index 43df176a1..548357508 100644 --- a/test/mix/tasks/pleroma/ecto/migrate_test.exs +++ b/test/mix/tasks/pleroma/ecto/migrate_test.exs @@ -3,7 +3,7 @@ # SPDX-License-Identifier: AGPL-3.0-onl defmodule Mix.Tasks.Pleroma.Ecto.MigrateTest do - use Pleroma.DataCase, async: true + use Pleroma.DataCase import ExUnit.CaptureLog require Logger diff --git a/test/mix/tasks/pleroma/instance_test.exs b/test/mix/tasks/pleroma/instance_test.exs index 7eaef75bf..1d2dde108 100644 --- a/test/mix/tasks/pleroma/instance_test.exs +++ b/test/mix/tasks/pleroma/instance_test.exs @@ -3,7 +3,8 @@ # SPDX-License-Identifier: AGPL-3.0-only defmodule Mix.Tasks.Pleroma.InstanceTest do - use Pleroma.DataCase, async: true + # Modifies the Application Environment, has to stay synchronous. + use Pleroma.DataCase setup do File.mkdir_p!(tmp_path()) @@ -17,6 +18,9 @@ defmodule Mix.Tasks.Pleroma.InstanceTest do end end) + # Is being modified by the mix task. + clear_config([:instance, :static_dir]) + :ok end diff --git a/test/pleroma/application_requirements_test.exs b/test/pleroma/application_requirements_test.exs index b432dbc37..e3cca5487 100644 --- a/test/pleroma/application_requirements_test.exs +++ b/test/pleroma/application_requirements_test.exs @@ -15,6 +15,7 @@ defmodule Pleroma.ApplicationRequirementsTest do describe "check_repo_pool_size!/1" do test "raises if the pool size is unexpected" do clear_config([Pleroma.Repo, :pool_size], 11) + clear_config([:dangerzone, :override_repo_pool_size], false) assert_raise Pleroma.ApplicationRequirements.VerifyError, "Repo.pool_size different than recommended value.", -- 2.45.2