Merge branch 'support/test' into 'develop'

clears `robot.txt` after tests

See merge request pleroma/pleroma!1715
This commit is contained in:
rinpatch 2019-09-25 18:51:45 +00:00
commit 16487716af

View file

@ -7,7 +7,16 @@ defmodule Pleroma.InstanceTest do
setup do setup do
File.mkdir_p!(tmp_path()) File.mkdir_p!(tmp_path())
on_exit(fn -> File.rm_rf(tmp_path()) end)
on_exit(fn ->
File.rm_rf(tmp_path())
static_dir = Pleroma.Config.get([:instance, :static_dir], "test/instance_static/")
if File.exists?(static_dir) do
File.rm_rf(Path.join(static_dir, "robots.txt"))
end
end)
:ok :ok
end end