mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Ensure to reset migration version after testing migration
"schema_migrations" table may be hard dropped before, so the reset migration version should be done in ensure block. https://buildkite.com/rails/rails/builds/61697#18d6f3ac-2257-4f4b-8efc-4010464c4d9a/999-1011
This commit is contained in:
parent
e9e7e7d3fd
commit
5a8714e559
1 changed files with 2 additions and 2 deletions
|
@ -285,7 +285,6 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase
|
|||
|
||||
uses_transaction \
|
||||
def test_schema_dumper_for_uuid_primary_key_default_in_legacy_migration
|
||||
ActiveRecord::SchemaMigration.delete_all
|
||||
@verbose_was = ActiveRecord::Migration.verbose
|
||||
ActiveRecord::Migration.verbose = false
|
||||
|
||||
|
@ -302,6 +301,7 @@ class PostgresqlUUIDGenerationTest < ActiveRecord::PostgreSQLTestCase
|
|||
ensure
|
||||
drop_table "pg_uuids_4"
|
||||
ActiveRecord::Migration.verbose = @verbose_was
|
||||
ActiveRecord::SchemaMigration.delete_all
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -335,7 +335,6 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase
|
|||
|
||||
uses_transaction \
|
||||
def test_schema_dumper_for_uuid_primary_key_with_default_nil_in_legacy_migration
|
||||
ActiveRecord::SchemaMigration.delete_all
|
||||
@verbose_was = ActiveRecord::Migration.verbose
|
||||
ActiveRecord::Migration.verbose = false
|
||||
|
||||
|
@ -352,6 +351,7 @@ class PostgresqlUUIDTestNilDefault < ActiveRecord::PostgreSQLTestCase
|
|||
ensure
|
||||
drop_table "pg_uuids_4"
|
||||
ActiveRecord::Migration.verbose = @verbose_was
|
||||
ActiveRecord::SchemaMigration.delete_all
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue