Test removed HTTP adapter
ci/woodpecker/push/woodpecker Pipeline is pending Details

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 @@ defmodule Pleroma.Config.DeprecationWarnings 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 @@ defmodule Pleroma.Config.DeprecationWarningsTest 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