projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add unit test for Pleroma API app controller
[akkoma]
/
lib
/
pleroma
/
application.ex
diff --git
a/lib/pleroma/application.ex
b/lib/pleroma/application.ex
index c853a2bb4564409c22bae36d5fdc1a622913a35a..9824e0a4ac3353ff195014cdcb591f6d1b809dda 100644
(file)
--- a/
lib/pleroma/application.ex
+++ b/
lib/pleroma/application.ex
@@
-25,7
+25,7
@@
defmodule Pleroma.Application do
if Process.whereis(Pleroma.Web.Endpoint) do
case Config.get([:http, :user_agent], :default) do
:default ->
if Process.whereis(Pleroma.Web.Endpoint) do
case Config.get([:http, :user_agent], :default) do
:default ->
- info = "#{Pleroma.Web.
base_
url()} <#{Config.get([:instance, :email], "")}>"
+ info = "#{Pleroma.Web.
Endpoint.
url()} <#{Config.get([:instance, :email], "")}>"
named_version() <> "; " <> info
custom ->
named_version() <> "; " <> info
custom ->
@@
-102,10
+102,8
@@
defmodule Pleroma.Application do
] ++
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
] ++
task_children(@mix_env) ++
dont_run_in_test(@mix_env) ++
- chat_child(chat_enabled?()) ++
- [
- Pleroma.Gopher.Server
- ]
+ shout_child(shout_enabled?()) ++
+ [Pleroma.Gopher.Server]
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
# See http://elixir-lang.org/docs/stable/elixir/Supervisor.html
# for other strategies and supported options
@@
-218,7
+216,7
@@
defmodule Pleroma.Application do
type: :worker
}
type: :worker
}
- defp
chat_enabled?, do: Config.get([:cha
t, :enabled])
+ defp
shout_enabled?, do: Config.get([:shou
t, :enabled])
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
defp dont_run_in_test(env) when env in [:test, :benchmark], do: []
@@
-230,17
+228,23
@@
defmodule Pleroma.Application do
keys: :duplicate,
partitions: System.schedulers_online()
]}
keys: :duplicate,
partitions: System.schedulers_online()
]}
+ ] ++ background_migrators()
+ end
+
+ defp background_migrators do
+ [
+ Pleroma.Migrators.HashtagsTableMigrator
]
end
]
end
- defp
cha
t_child(true) do
+ defp
shou
t_child(true) do
[
[
- Pleroma.Web.
ChatChannel.Cha
tChannelState,
+ Pleroma.Web.
ShoutChannel.Shou
tChannelState,
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
{Phoenix.PubSub, [name: Pleroma.PubSub, adapter: Phoenix.PubSub.PG2]}
]
end
- defp
cha
t_child(_), do: []
+ defp
shou
t_child(_), do: []
defp task_children(:test) do
[
defp task_children(:test) do
[