forked from AkkomaGang/akkoma
Test removed HTTP adapter
This commit is contained in:
parent
503827a3d9
commit
9c71782861
4 changed files with 16 additions and 2 deletions
|
@ -1056,7 +1056,7 @@ Most of the settings will be applied in `runtime`, this means that you don't nee
|
|||
|
||||
Example of setting without keyword in value:
|
||||
```elixir
|
||||
config :tesla, :adapter, Tesla.Adapter.Hackney
|
||||
config :tesla, :adapter, {Tesla.Adapter.Finch, name: MyFinch}
|
||||
```
|
||||
|
||||
List of settings which support only full update by key:
|
||||
|
|
|
@ -213,6 +213,7 @@ def check_welcome_message_config do
|
|||
|
||||
def check_http_adapter do
|
||||
http_adapter = Application.get_env(:tesla, :adapter)
|
||||
|
||||
case http_adapter do
|
||||
{Tesla.Adapter.Finch, _} ->
|
||||
:ok
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
defmodule Pleroma.Repo.Migrations.RemoveUnusedIndices do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
drop_if_exists(
|
||||
index(:activities, ["(data->>'actor')", "inserted_at desc"], name: :activities_actor_index)
|
||||
)
|
||||
|
||||
drop_if_exists(index(:objects, ["(data->'tag')"], using: :gin, name: :objects_tags))
|
||||
end
|
||||
end
|
|
@ -281,10 +281,12 @@ test "check_uploders_s3_public_endpoint/0" do
|
|||
end
|
||||
|
||||
test "check_http_adapter/0" do
|
||||
clear_config([:tesla, :adapter], Gun)
|
||||
Application.put_env(:tesla, :adapter, Gun)
|
||||
|
||||
assert capture_log(fn ->
|
||||
DeprecationWarnings.check_http_adapter()
|
||||
end) =~ "Your config is using a custom tesla adapter"
|
||||
|
||||
Application.put_env(:tesla, :adapter, Tesla.Mock)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue