Don't run LastFm.Feed in tests

This commit is contained in:
Claudio Ortolina
2024-11-04 09:45:05 +00:00
parent a0543de1f2
commit d818cdbae5
7 changed files with 34 additions and 7 deletions
+5 -1
View File
@@ -15,7 +15,7 @@ defmodule MusicLibrary.Application do
repos: Application.fetch_env!(:music_library, :ecto_repos), skip: skip_migrations?()},
{DNSCluster, query: Application.get_env(:music_library, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: MusicLibrary.PubSub},
LastFm.Supervisor,
{LastFm.Supervisor, api: last_fm()},
# Start a worker by calling: MusicLibrary.Worker.start_link(arg)
# {MusicLibrary.Worker, arg},
# Start to serve requests, typically the last entry
@@ -40,4 +40,8 @@ defmodule MusicLibrary.Application do
# By default, sqlite migrations are run when using a release
System.get_env("RELEASE_NAME") != nil
end
defp last_fm do
Application.get_env(:music_library, :last_fm, LastFm.APIImpl)
end
end