From af63f6d65abe5aa8c30f7a6d9c76c56bb6561976 Mon Sep 17 00:00:00 2001 From: FloatingGhost Date: Sat, 26 Nov 2022 19:26:18 +0000 Subject: [PATCH] Fix tests broken by relay default changes --- .../pleroma/web/activity_pub/activity_pub_controller_test.exs | 2 +- test/pleroma/web/federator_test.exs | 2 +- test/pleroma/web/media_proxy/invalidation/script_test.exs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs index 424b87b20..2008ebf04 100644 --- a/test/pleroma/web/activity_pub/activity_pub_controller_test.exs +++ b/test/pleroma/web/activity_pub/activity_pub_controller_test.exs @@ -33,7 +33,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubControllerTest do setup do: clear_config([:instance, :federating], true) describe "/relay" do - setup do: clear_config([:instance, :allow_relay]) + setup do: clear_config([:instance, :allow_relay], true) test "with the relay active, it returns the relay user", %{conn: conn} do res = diff --git a/test/pleroma/web/federator_test.exs b/test/pleroma/web/federator_test.exs index c32972181..c774090d5 100644 --- a/test/pleroma/web/federator_test.exs +++ b/test/pleroma/web/federator_test.exs @@ -22,7 +22,7 @@ defmodule Pleroma.Web.FederatorTest do end setup_all do: clear_config([:instance, :federating], true) - setup do: clear_config([:instance, :allow_relay]) + setup do: clear_config([:instance, :allow_relay], true) setup do: clear_config([:mrf, :policies]) setup do: clear_config([:mrf_keyword]) diff --git a/test/pleroma/web/media_proxy/invalidation/script_test.exs b/test/pleroma/web/media_proxy/invalidation/script_test.exs index e9629b72b..67a233037 100644 --- a/test/pleroma/web/media_proxy/invalidation/script_test.exs +++ b/test/pleroma/web/media_proxy/invalidation/script_test.exs @@ -13,8 +13,8 @@ defmodule Pleroma.Web.MediaProxy.Invalidation.ScriptTest do assert Invalidation.Script.purge( ["http://example.com/media/example.jpg"], script_path: "./example" - ) == {:error, "%ErlangError{original: :enoent}"} - end) =~ "Error while cache purge: %ErlangError{original: :enoent}" + ) == {:error, "%ErlangError{original: :enoent, reason: nil}"} + end) =~ "Error while cache purge: %ErlangError{original: :enoent" capture_log(fn -> assert Invalidation.Script.purge(