diff options
author | Maksim Pechnikov <parallel588@gmail.com> | 2020-09-18 07:08:37 +0300 |
---|---|---|
committer | Maksim Pechnikov <parallel588@gmail.com> | 2020-09-18 07:08:37 +0300 |
commit | 2ec0dcf00194544449a5d7768ab10777b294895b (patch) | |
tree | 1c2f097403f48e6f43894ac792ce77dc5992b32d /test/tasks/config_test.exs | |
parent | 5a8ea0a5b07c22d567a60af36345483fe880b638 (diff) | |
parent | 49584a9928f02b461a0356332440084473ea6b69 (diff) | |
download | pleroma-2ec0dcf00194544449a5d7768ab10777b294895b.tar.gz pleroma-2ec0dcf00194544449a5d7768ab10777b294895b.zip |
Merge branch 'develop' into issue/2099
Diffstat (limited to 'test/tasks/config_test.exs')
-rw-r--r-- | test/tasks/config_test.exs | 13 |
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) == [] |