Tests: Make as many tests as possible async.
In general, tests that match these criteria can be made async: - Doesn't use real Cachex. - Doesn't write to the Config / Application Environment. - Uses Mock. Using Mox is fine. - Uses the streamer.
This commit is contained in:
parent
c9d73af74d
commit
9ba60f70d2
134 changed files with 141 additions and 137 deletions
|
|
@ -3,7 +3,7 @@
|
|||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
defmodule Mix.Tasks.Pleroma.InstanceTest do
|
||||
use ExUnit.Case
|
||||
use Pleroma.DataCase, async: true
|
||||
|
||||
setup do
|
||||
File.mkdir_p!(tmp_path())
|
||||
|
|
@ -15,15 +15,14 @@ defmodule Mix.Tasks.Pleroma.InstanceTest do
|
|||
if File.exists?(static_dir) do
|
||||
File.rm_rf(Path.join(static_dir, "robots.txt"))
|
||||
end
|
||||
|
||||
Pleroma.Config.put([:instance, :static_dir], static_dir)
|
||||
end)
|
||||
|
||||
:ok
|
||||
end
|
||||
|
||||
@uuid Ecto.UUID.generate()
|
||||
defp tmp_path do
|
||||
"/tmp/generated_files/"
|
||||
"/tmp/generated_files/#{@uuid}/"
|
||||
end
|
||||
|
||||
test "running gen" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue