Initial yt-dlp implementation (#3)
* Added basic runner for yt-dlp commands * Updated formatting rules * Added JSON runner; Added test script for CLI interactions * Reworked yt-dlp runner; added proper test mocks
This commit is contained in:
+4
-1
@@ -9,7 +9,10 @@ import Config
|
||||
|
||||
config :pinchflat,
|
||||
ecto_repos: [Pinchflat.Repo],
|
||||
generators: [timestamp_type: :utc_datetime]
|
||||
generators: [timestamp_type: :utc_datetime],
|
||||
# Specifying backend data here makes mocking and local testing SUPER easy
|
||||
yt_dlp_executable: System.find_executable("yt-dlp"),
|
||||
yt_dlp_runner: Pinchflat.DownloaderBackends.YtDlp.CommandRunner
|
||||
|
||||
# Configures the endpoint
|
||||
config :pinchflat, PinchflatWeb.Endpoint,
|
||||
|
||||
+7
-3
@@ -1,14 +1,18 @@
|
||||
import Config
|
||||
|
||||
config :pinchflat,
|
||||
# Specifying backend data here makes mocking and local testing SUPER easy
|
||||
yt_dlp_executable: Path.join([File.cwd!(), "/test/support/scripts/yt-dlp-mocks/repeater.sh"])
|
||||
|
||||
# Configure your database
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :pinchflat, Pinchflat.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
username: System.get_env("POSTGRES_USER"),
|
||||
password: System.get_env("POSTGRES_PASSWORD"),
|
||||
hostname: System.get_env("POSTGRES_HOST"),
|
||||
database: "pinchflat_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 10
|
||||
|
||||
Reference in New Issue
Block a user