clears `robot.txt` after tests

This commit is contained in:
Maksim Pechnikov 2019-09-25 13:13:35 +03:00
parent 29dd8ab9c0
commit 1b2e4a0ae0
1 changed files with 10 additions and 1 deletions

View File

@ -7,7 +7,16 @@ defmodule Pleroma.InstanceTest do
setup do
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], "instance/static/")
if File.exists?(static_dir) do
File.rm_rf(Path.join(static_dir, "robots.txt"))
end
end)
:ok
end