Merge branch 'unicode-search' into 'develop'
[akkoma] / test / tasks / instance_test.exs
index 229ecc9c10a10d3e927c1270cfba592020efb34d..6d7eed4c1477186bd134329d5266711f9af57127 100644 (file)
@@ -1,9 +1,22 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
 defmodule Pleroma.InstanceTest do
   use ExUnit.Case, async: true
 
   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