Cleanup uploads after the tests are finished
authorrinpatch <rinpatch@sdf.org>
Wed, 18 Sep 2019 20:34:13 +0000 (23:34 +0300)
committerrinpatch <rinpatch@sdf.org>
Wed, 18 Sep 2019 20:34:13 +0000 (23:34 +0300)
test/test_helper.exs

index a927b2c3d8021267aedcc2057008e73d0df2116a..6a389365f58693f9808aed80a2eb7ca6ff0dcb11 100644 (file)
@@ -7,3 +7,8 @@ ExUnit.start(exclude: os_exclude)
 Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, :manual)
 Mox.defmock(Pleroma.ReverseProxy.ClientMock, for: Pleroma.ReverseProxy.Client)
 {:ok, _} = Application.ensure_all_started(:ex_machina)
+
+ExUnit.after_suite(fn _results ->
+  uploads = Pleroma.Config.get([Pleroma.Uploaders.Local, :uploads], "test/uploads")
+  File.rm_rf!(uploads)
+end)