forked from AkkomaGang/akkoma
Initial test validating the AdminAPI issue
This commit is contained in:
parent
d2a03d3c86
commit
905efc57e9
1 changed files with 35 additions and 0 deletions
|
@ -1452,6 +1452,41 @@ test "custom instance thumbnail", %{conn: conn} do
|
|||
|
||||
assert res = %{"thumbnail" => "https://example.com/media/new_thumbnail.jpg"}
|
||||
end
|
||||
|
||||
test "Concurrent Limiter", %{conn: conn} do
|
||||
clear_config([ConcurrentLimiter])
|
||||
|
||||
params = %{
|
||||
"group" => ":pleroma",
|
||||
"key" => "ConcurrentLimiter",
|
||||
"value" => [
|
||||
%{
|
||||
"tuple" => [
|
||||
"Pleroma.Web.RichMedia.Helpers",
|
||||
[
|
||||
%{"tuple" => [":max_running", 6]},
|
||||
%{"tuple" => [":max_waiting", 6]}
|
||||
]
|
||||
]
|
||||
},
|
||||
%{
|
||||
"tuple" => [
|
||||
"Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy",
|
||||
[
|
||||
%{"tuple" => [":max_running", 7]},
|
||||
%{"tuple" => [":max_waiting", 7]}
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
_res =
|
||||
assert conn
|
||||
|> put_req_header("content-type", "application/json")
|
||||
|> post("/api/pleroma/admin/config", %{"configs" => [params]})
|
||||
|> json_response_and_validate_schema(200)
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET /api/pleroma/admin/config/descriptions" do
|
||||
|
|
Loading…
Reference in a new issue