Merge branch 'develop' into feature/store-statuses-data-inside-flag
[akkoma] / test / tasks / instance_test.exs
index 70986374eda7b611da94c40f5ba6c2eed7690fc3..6d7eed4c1477186bd134329d5266711f9af57127 100644 (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], "test/instance_static/")
+
+      if File.exists?(static_dir) do
+        File.rm_rf(Path.join(static_dir, "robots.txt"))
+      end
+    end)
+
     :ok
   end