1
0
Fork 1
mirror of https://akkoma.dev/AkkomaGang/akkoma.git synced 2024-11-17 10:39:17 +00:00

Test removed HTTP adapter

This commit is contained in:
FloatingGhost 2022-12-11 23:50:31 +00:00
parent 503827a3d9
commit 9c71782861
4 changed files with 16 additions and 2 deletions

View file

@ -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:

View file

@ -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

View file

@ -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

View file

@ -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