X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=inline;f=test%2Fpleroma%2Fconfig%2Ftransfer_task_test.exs;h=c56f20ec55b6b66fbf01c858551073e99bc7146b;hb=90c4785b893416b95e637437b08298781e86573c;hp=f53829e094ca5ac272171dc64caa06f58de91bb2;hpb=b738f709532ff18845f5d8cc3888d0bd67f750ab;p=akkoma
diff --git a/test/pleroma/config/transfer_task_test.exs b/test/pleroma/config/transfer_task_test.exs
index f53829e09..c56f20ec5 100644
--- a/test/pleroma/config/transfer_task_test.exs
+++ b/test/pleroma/config/transfer_task_test.exs
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors
+# Copyright © 2017-2021 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Config.TransferTaskTest do
@@ -82,6 +82,7 @@ defmodule Pleroma.Config.TransferTaskTest do
on_exit(fn -> Restarter.Pleroma.refresh() end)
end
+ @tag :erratic
test "don't restart if no reboot time settings were changed" do
clear_config(:emoji)
insert(:config, key: :emoji, value: [groups: [a: 1, b: 2]])
@@ -92,23 +93,26 @@ defmodule Pleroma.Config.TransferTaskTest do
)
end
+ @tag :erratic
test "on reboot time key" do
- clear_config(:chat)
- insert(:config, key: :chat, value: [enabled: false])
+ clear_config([:pleroma, :rate_limit])
+ insert(:config, key: {:pleroma, :rate_limit}, value: [enabled: false])
assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted"
end
+ @tag :erratic
test "on reboot time subkey" do
clear_config(Pleroma.Captcha)
insert(:config, key: Pleroma.Captcha, value: [seconds_valid: 60])
assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted"
end
+ @tag :erratic
test "don't restart pleroma on reboot time key and subkey if there is false flag" do
- clear_config(:chat)
+ clear_config([:pleroma, :rate_limit])
clear_config(Pleroma.Captcha)
- insert(:config, key: :chat, value: [enabled: false])
+ insert(:config, key: {:pleroma, :rate_limit}, value: [enabled: false])
insert(:config, key: Pleroma.Captcha, value: [seconds_valid: 60])
refute String.contains?(