projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
503827a
)
Test removed HTTP adapter
author
FloatingGhost
<hannah@coffee-and-dreams.uk>
Sun, 11 Dec 2022 23:50:31 +0000
(23:50 +0000)
committer
FloatingGhost
<hannah@coffee-and-dreams.uk>
Sun, 11 Dec 2022 23:50:31 +0000
(23:50 +0000)
docs/docs/development/API/admin_api.md
patch
|
blob
|
history
lib/pleroma/config/deprecation_warnings.ex
patch
|
blob
|
history
priv/repo/migrations/20221211234352_remove_unused_indices.exs
[new file with mode: 0644]
patch
|
blob
test/pleroma/config/deprecation_warnings_test.exs
patch
|
blob
|
history
diff --git
a/docs/docs/development/API/admin_api.md
b/docs/docs/development/API/admin_api.md
index 211b5e736c5e4682e111b2211c68e7898092d782..79cb573ac1625684a21426500b3d0d6bd0597fe1 100644
(file)
--- a/
docs/docs/development/API/admin_api.md
+++ b/
docs/docs/development/API/admin_api.md
@@
-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
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:
```
List of settings which support only full update by key:
diff --git
a/lib/pleroma/config/deprecation_warnings.ex
b/lib/pleroma/config/deprecation_warnings.ex
index 972d1fb9669066cdbe447a3d808f8214603f3cbf..076b4cbf012c33c3badecf554624ca4f8c2a41bb 100644
(file)
--- a/
lib/pleroma/config/deprecation_warnings.ex
+++ b/
lib/pleroma/config/deprecation_warnings.ex
@@
-213,6
+213,7
@@
defmodule Pleroma.Config.DeprecationWarnings do
def check_http_adapter do
http_adapter = Application.get_env(:tesla, :adapter)
def check_http_adapter do
http_adapter = Application.get_env(:tesla, :adapter)
+
case http_adapter do
{Tesla.Adapter.Finch, _} ->
:ok
case http_adapter do
{Tesla.Adapter.Finch, _} ->
:ok
diff --git a/priv/repo/migrations/20221211234352_remove_unused_indices.exs
b/priv/repo/migrations/20221211234352_remove_unused_indices.exs
new file mode 100644
(file)
index 0000000..
facc85a
--- /dev/null
+++ b/
priv/repo/migrations/20221211234352_remove_unused_indices.exs
@@ -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
diff --git
a/test/pleroma/config/deprecation_warnings_test.exs
b/test/pleroma/config/deprecation_warnings_test.exs
index a5660189641d8fbaa3b4a1f94f06b172e3cd2ec6..b18267a7f436be42d9fb01cfb946903f5d793bfb 100644
(file)
--- a/
test/pleroma/config/deprecation_warnings_test.exs
+++ b/
test/pleroma/config/deprecation_warnings_test.exs
@@
-281,10
+281,12
@@
defmodule Pleroma.Config.DeprecationWarningsTest do
end
test "check_http_adapter/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"
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
end
end