summaryrefslogtreecommitdiff
path: root/test/tasks/config_test.exs
diff options
context:
space:
mode:
authorAlex Gleason <alex@alexgleason.me>2020-10-08 15:44:48 -0500
committerAlex Gleason <alex@alexgleason.me>2020-10-08 15:44:48 -0500
commit77b1ea68a7700ac4a78c7f2e0ea9f118441d23da (patch)
tree06243af101a609256b517f48175380a7c4f5bfbb /test/tasks/config_test.exs
parent4af1b803811cbb59d41f0149706d6dda340b4755 (diff)
parent74be4de3f6c2c34447029649526637411acfa9f3 (diff)
downloadpleroma-77b1ea68a7700ac4a78c7f2e0ea9f118441d23da.tar.gz
pleroma-77b1ea68a7700ac4a78c7f2e0ea9f118441d23da.zip
Merge remote-tracking branch 'upstream/develop' into aliases
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) == []