diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2020-05-04 00:46:14 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2020-05-04 00:46:14 +0300 |
commit | 6cab0f820ec2ee112eb4dec84fa7d1c9cd9fca73 (patch) | |
tree | 2c18c26fcc2d97fe1bde68065c1d74a48ba11ec2 | |
parent | 2a6e6287ea120ace82f7d39ef18e4d33b212e3e0 (diff) | |
download | pleroma-6cab0f820ec2ee112eb4dec84fa7d1c9cd9fca73.tar.gz |
fix tests
-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() |