summaryrefslogtreecommitdiff
path: root/test/tasks/config_test.exs
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-09-23 11:56:22 -0500
committerMark Felder <feld@FreeBSD.org>2020-09-23 11:56:22 -0500
commitf3a1f9c3bbb7321876a09b3846b5e10ecf4af94f (patch)
treebcfd29188a841470cdeca478b1c5a3bbd4cc930a /test/tasks/config_test.exs
parent34d7e864db8f9cc7fb73ce2fef8466ce8e09ed85 (diff)
parente02101e15c425416975f756aca7f3b058006668d (diff)
downloadpleroma-f3a1f9c3bbb7321876a09b3846b5e10ecf4af94f.tar.gz
pleroma-f3a1f9c3bbb7321876a09b3846b5e10ecf4af94f.zip
Merge branch 'develop' into feature/bulk-confirmation
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) == []