From d4dd21303a68df88906d11c4f11961718f7efc59 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Tue, 28 Nov 2023 21:00:58 +0000 Subject: [PATCH] Remove call to Pleroma.Web.Endpoint.config_change/2 This is not necessary for the tests to pass and breaks other tests as this change doesn't get cleanly reverted causing the hostname to stay set this way and leak into other test causing failures with "sub.example.com" not matching "localhost" --- .../web/web_finger/web_finger_controller_test.exs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/test/pleroma/web/web_finger/web_finger_controller_test.exs b/test/pleroma/web/web_finger/web_finger_controller_test.exs index 263191619..e952ccc60 100644 --- a/test/pleroma/web/web_finger/web_finger_controller_test.exs +++ b/test/pleroma/web/web_finger/web_finger_controller_test.exs @@ -55,12 +55,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do ] end - test "reach user on tld, while pleroma is running on subdomain" do - Pleroma.Web.Endpoint.config_change( - [{Pleroma.Web.Endpoint, url: [host: "sub.example.com"]}], - [] - ) - + test "reach user on tld, while pleroma is runned on subdomain" do clear_config([Pleroma.Web.Endpoint, :url, :host], "sub.example.com") clear_config([Pleroma.Web.WebFinger, :domain], "example.com") @@ -75,13 +70,6 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do assert response["subject"] == "acct:#{user.nickname}@example.com" assert response["aliases"] == ["https://sub.example.com/users/#{user.nickname}"] - - on_exit(fn -> - Pleroma.Web.Endpoint.config_change( - [{Pleroma.Web.Endpoint, url: [host: "localhost"]}], - [] - ) - end) end test "it returns 404 when user isn't found (JSON)" do