gun: connection pool worker: start up when in the test environment

This commit is contained in:
Ariadne Conill 2019-08-18 23:34:28 +00:00
parent f7eaf9f763
commit a53a450550

View File

@ -14,7 +14,7 @@ defmodule Pleroma.Gun.Connections do
defstruct conns: %{}
def start_link(_) do
if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun do
if Application.get_env(:tesla, :adapter) == Tesla.Adapter.Gun || Mix.env() == :test do
GenServer.start_link(__MODULE__, [])
else
:ignore