aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-02-24 20:52:10 +0000
committerrinpatch <rinpatch@sdf.org>2020-02-24 20:52:10 +0000
commit035c2c1415ed46abb268cf85c141384416a799e2 (patch)
treebbbe49672fee2527fa68c0252bb6ec13e1d62fdf /test
parent908b6ee49a049e60d705e7f923e71326a965f360 (diff)
parent5e4fe0e8f7fcfefc037885421d41de3a4328a881 (diff)
downloadpleroma-035c2c1415ed46abb268cf85c141384416a799e2.tar.gz
Merge branch 'fix/instance-gen-custom-static' into 'develop'
instance.gen task: fix crash when using custom static directory Closes #1082 See merge request pleroma/pleroma!2237
Diffstat (limited to 'test')
-rw-r--r--test/tasks/instance_test.exs5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/tasks/instance_test.exs b/test/tasks/instance_test.exs
index d69275726..61f5833fc 100644
--- a/test/tasks/instance_test.exs
+++ b/test/tasks/instance_test.exs
@@ -3,9 +3,10 @@
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.InstanceTest do
- use ExUnit.Case, async: true
+ use ExUnit.Case
setup do
+ static_dir = Pleroma.Config.get([:instance, :static_dir])
File.mkdir_p!(tmp_path())
on_exit(fn ->
@@ -15,6 +16,8 @@ defmodule Pleroma.InstanceTest do
if File.exists?(static_dir) do
File.rm_rf(Path.join(static_dir, "robots.txt"))
end
+
+ Pleroma.Config.put([:instance, :static_dir], static_dir)
end)
:ok