forked from AkkomaGang/akkoma
Merge branch 'erratic-tests' into 'develop'
Skip erratic tests See merge request pleroma/pleroma!3572
This commit is contained in:
commit
9c1cb87eff
3 changed files with 9 additions and 1 deletions
|
@ -82,6 +82,7 @@ test "transfer config values with full subkey update" do
|
||||||
on_exit(fn -> Restarter.Pleroma.refresh() end)
|
on_exit(fn -> Restarter.Pleroma.refresh() end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "don't restart if no reboot time settings were changed" do
|
test "don't restart if no reboot time settings were changed" do
|
||||||
clear_config(:emoji)
|
clear_config(:emoji)
|
||||||
insert(:config, key: :emoji, value: [groups: [a: 1, b: 2]])
|
insert(:config, key: :emoji, value: [groups: [a: 1, b: 2]])
|
||||||
|
@ -92,18 +93,21 @@ test "don't restart if no reboot time settings were changed" do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "on reboot time key" do
|
test "on reboot time key" do
|
||||||
clear_config(:shout)
|
clear_config(:shout)
|
||||||
insert(:config, key: :shout, value: [enabled: false])
|
insert(:config, key: :shout, value: [enabled: false])
|
||||||
assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted"
|
assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "on reboot time subkey" do
|
test "on reboot time subkey" do
|
||||||
clear_config(Pleroma.Captcha)
|
clear_config(Pleroma.Captcha)
|
||||||
insert(:config, key: Pleroma.Captcha, value: [seconds_valid: 60])
|
insert(:config, key: Pleroma.Captcha, value: [seconds_valid: 60])
|
||||||
assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted"
|
assert capture_log(fn -> TransferTask.start_link([]) end) =~ "pleroma restarted"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "don't restart pleroma on reboot time key and subkey if there is false flag" do
|
test "don't restart pleroma on reboot time key and subkey if there is false flag" do
|
||||||
clear_config(:shout)
|
clear_config(:shout)
|
||||||
clear_config(Pleroma.Captcha)
|
clear_config(Pleroma.Captcha)
|
||||||
|
|
|
@ -48,6 +48,7 @@ test "it is enabled if remote_ip_found flag doesn't exist" do
|
||||||
refute RateLimiter.disabled?(build_conn())
|
refute RateLimiter.disabled?(build_conn())
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "it restricts based on config values" do
|
test "it restricts based on config values" do
|
||||||
limiter_name = :test_plug_opts
|
limiter_name = :test_plug_opts
|
||||||
scale = 80
|
scale = 80
|
||||||
|
@ -137,6 +138,7 @@ test "it supports combination of options modifying bucket name" do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "unauthenticated users" do
|
describe "unauthenticated users" do
|
||||||
|
@tag :erratic
|
||||||
test "are restricted based on remote IP" do
|
test "are restricted based on remote IP" do
|
||||||
limiter_name = :test_unauthenticated
|
limiter_name = :test_unauthenticated
|
||||||
clear_config([:rate_limit, limiter_name], [{1000, 5}, {1, 10}])
|
clear_config([:rate_limit, limiter_name], [{1000, 5}, {1, 10}])
|
||||||
|
@ -174,6 +176,7 @@ test "are restricted based on remote IP" do
|
||||||
:ok
|
:ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "can have limits separate from unauthenticated connections" do
|
test "can have limits separate from unauthenticated connections" do
|
||||||
limiter_name = :test_authenticated1
|
limiter_name = :test_authenticated1
|
||||||
|
|
||||||
|
@ -199,6 +202,7 @@ test "can have limits separate from unauthenticated connections" do
|
||||||
assert conn.halted
|
assert conn.halted
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@tag :erratic
|
||||||
test "different users are counted independently" do
|
test "different users are counted independently" do
|
||||||
limiter_name = :test_authenticated2
|
limiter_name = :test_authenticated2
|
||||||
clear_config([:rate_limit, limiter_name], [{1, 10}, {1000, 5}])
|
clear_config([:rate_limit, limiter_name], [{1, 10}, {1000, 5}])
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
os_exclude = if :os.type() == {:unix, :darwin}, do: [skip_on_mac: true], else: []
|
os_exclude = if :os.type() == {:unix, :darwin}, do: [skip_on_mac: true], else: []
|
||||||
ExUnit.start(exclude: [:federated | os_exclude])
|
ExUnit.start(exclude: [:federated, :erratic] ++ os_exclude)
|
||||||
|
|
||||||
Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, :manual)
|
Ecto.Adapters.SQL.Sandbox.mode(Pleroma.Repo, :manual)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue