diff options
-rw-r--r-- | lib/pleroma/web/frontend_controller.ex | 3 | ||||
-rw-r--r-- | test/plugs/instance_static_test.exs | 12 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/pleroma/web/frontend_controller.ex b/lib/pleroma/web/frontend_controller.ex index 71fae0bb8..2ba445df9 100644 --- a/lib/pleroma/web/frontend_controller.ex +++ b/lib/pleroma/web/frontend_controller.ex @@ -69,7 +69,8 @@ defmodule Pleroma.Web.FrontendController do {:ok, priv_path} true -> - {:error, "index.html file was not found"} + {:error, + "index.html file was not found in #{inspect([instance_path, frontend_path, priv_path])}"} end end end diff --git a/test/plugs/instance_static_test.exs b/test/plugs/instance_static_test.exs index 1f70f4645..ddbd6c0ad 100644 --- a/test/plugs/instance_static_test.exs +++ b/test/plugs/instance_static_test.exs @@ -10,9 +10,15 @@ defmodule Pleroma.Web.RuntimeStaticPlugTest do @fe_dir Path.join([@dir, "frontends", @primary_fe["name"], @primary_fe["ref"]]) setup do - [@dir, "frontends", @primary_fe["name"], @primary_fe["ref"], "static"] - |> Path.join() - |> File.mkdir_p() + frontend_dir = Path.join([@dir, "frontends", @primary_fe["name"], @primary_fe["ref"]]) + + frontend_dir + |> Path.join("static") + |> File.mkdir_p!() + + frontend_dir + |> Path.join("index.html") + |> File.write!("<html></html>") [@dir, "static"] |> Path.join() |