mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-21 00:39:16 +00:00
Merge branch 'ecto-rollback-in-test-env' into 'develop'
Possibility to run rollback in test env See merge request pleroma/pleroma!3212
This commit is contained in:
commit
2217b35bd4
|
@ -20,7 +20,8 @@ defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
|
|||
start: :boolean,
|
||||
quiet: :boolean,
|
||||
log_sql: :boolean,
|
||||
migrations_path: :string
|
||||
migrations_path: :string,
|
||||
env: :string
|
||||
]
|
||||
|
||||
@moduledoc """
|
||||
|
@ -59,7 +60,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.Rollback do
|
|||
level = Logger.level()
|
||||
Logger.configure(level: :info)
|
||||
|
||||
if Pleroma.Config.get(:env) == :test do
|
||||
if opts[:env] == "test" do
|
||||
Logger.info("Rollback succesfully")
|
||||
else
|
||||
{:ok, _, _} =
|
||||
|
|
|
@ -12,7 +12,7 @@ defmodule Mix.Tasks.Pleroma.Ecto.RollbackTest do
|
|||
Logger.configure(level: :warn)
|
||||
|
||||
assert capture_log(fn ->
|
||||
Mix.Tasks.Pleroma.Ecto.Rollback.run()
|
||||
Mix.Tasks.Pleroma.Ecto.Rollback.run(["--env", "test"])
|
||||
end) =~ "[info] Rollback succesfully"
|
||||
|
||||
Logger.configure(level: level)
|
||||
|
|
Loading…
Reference in a new issue