Skip to content

Commit 1492fc5

Browse files
committed
chore: stabilize migration tests
1 parent 3995ba3 commit 1492fc5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/dev_migrations_test.exs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ defmodule AshPostgres.DevMigrationsTest do
9494
do: File.ls!(tenant_migrations_dev_path),
9595
else: []
9696

97-
on_exit(fn ->
97+
clean = fn ->
9898
if File.exists?(resource_dev_path) do
9999
current_resource_files = File.ls!(resource_dev_path)
100100
new_resource_files = current_resource_files -- initial_resource_files
@@ -120,7 +120,11 @@ defmodule AshPostgres.DevMigrationsTest do
120120
end
121121

122122
AshPostgres.DevTestRepo.query!("DROP TABLE IF EXISTS posts")
123-
end)
123+
end
124+
125+
clean.()
126+
127+
on_exit(clean)
124128
end
125129

126130
describe "--dev option" do

0 commit comments

Comments
 (0)