X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Ftasks%2Finstance_test.exs;h=f6a4ba5085324ff65230288e3e53e72458dd5360;hb=f5bda09de648a6de3151c8614005ebc70447facb;hp=70986374eda7b611da94c40f5ba6c2eed7690fc3;hpb=75be90a6d177b00c4ca1083331975805c6f9afde;p=akkoma
diff --git a/test/tasks/instance_test.exs b/test/tasks/instance_test.exs
index 70986374e..f6a4ba508 100644
--- a/test/tasks/instance_test.exs
+++ b/test/tasks/instance_test.exs
@@ -1,13 +1,24 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2019 Pleroma Authors
+# Copyright © 2017-2020 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.InstanceTest do
- use ExUnit.Case, async: true
+ use ExUnit.Case
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
+
+ Pleroma.Config.put([:instance, :static_dir], static_dir)
+ end)
+
:ok
end
@@ -69,7 +80,7 @@ defmodule Pleroma.InstanceTest do
assert generated_config =~ "database: \"dbname\""
assert generated_config =~ "username: \"dbuser\""
assert generated_config =~ "password: \"dbpass\""
- assert generated_config =~ "dynamic_configuration: true"
+ assert generated_config =~ "configurable_from_database: true"
assert generated_config =~ "http: [ip: {127, 0, 0, 1}, port: 4000]"
assert File.read!(tmp_path() <> "setup.psql") == generated_setup_psql()
end