Maintenance: Fix failing database cleanup for custom development.
This commit is contained in:
parent
605f5f6fa2
commit
6cbce23c54
1 changed files with 2 additions and 7 deletions
|
@ -25,13 +25,8 @@ require 'rspec/rails'
|
||||||
#
|
#
|
||||||
Dir[Rails.root.join('spec/support/**/*.rb')].sort.each { |f| require f }
|
Dir[Rails.root.join('spec/support/**/*.rb')].sort.each { |f| require f }
|
||||||
|
|
||||||
# Checks if the database schema is up-to-date and re-creates the database if needed.
|
# Reset database to be ready for tests
|
||||||
ActiveRecord::Migration.maintain_test_schema!
|
Rake::Task['zammad:db:reset'].execute
|
||||||
|
|
||||||
# Since maintain_test_schema! may provide an unseeded database, but tests rely on the seeding.
|
|
||||||
if User.count.zero?
|
|
||||||
Rake::Task['db:seed'].execute
|
|
||||||
end
|
|
||||||
|
|
||||||
# make sure that all migrations of linked packages are executed
|
# make sure that all migrations of linked packages are executed
|
||||||
Package::Migration.linked
|
Package::Migration.linked
|
||||||
|
|
Loading…
Reference in a new issue