summaryrefslogtreecommitdiff
path: root/test/tasks/config_test.exs
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-09-22 17:13:46 +0200
committerlain <lain@soykaf.club>2020-09-22 17:13:46 +0200
commitc95859e45b18dec1d00f721ef3c5b4bb1406ea37 (patch)
treec22f7a200c0e0e551796bf5e9f1b09afccd64dd4 /test/tasks/config_test.exs
parent9853c90abba213bdc87dccf5620cb0d9eb19c049 (diff)
parent02f12ec6253093d8bedaf84d78d0f7e533745e1b (diff)
downloadpleroma-c95859e45b18dec1d00f721ef3c5b4bb1406ea37.tar.gz
pleroma-c95859e45b18dec1d00f721ef3c5b4bb1406ea37.zip
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into issue/2115
Diffstat (limited to 'test/tasks/config_test.exs')
-rw-r--r--test/tasks/config_test.exs13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/tasks/config_test.exs b/test/tasks/config_test.exs
index fb12e7fb3..f36648829 100644
--- a/test/tasks/config_test.exs
+++ b/test/tasks/config_test.exs
@@ -40,6 +40,19 @@ defmodule Mix.Tasks.Pleroma.ConfigTest do
on_exit(fn -> Application.put_env(:quack, :level, initial) end)
end
+ @tag capture_log: true
+ test "config migration refused when deprecated settings are found" do
+ clear_config([:media_proxy, :whitelist], ["domain_without_scheme.com"])
+ assert Repo.all(ConfigDB) == []
+
+ Mix.Tasks.Pleroma.Config.migrate_to_db("test/fixtures/config/temp.secret.exs")
+
+ assert_received {:mix_shell, :error, [message]}
+
+ assert message =~
+ "Migration is not allowed until all deprecation warnings have been resolved."
+ end
+
test "filtered settings are migrated to db" do
assert Repo.all(ConfigDB) == []