Ensure that doesn't have pending migrations when running the specs
This commit is contained in:
parent
1d5f96cf97
commit
bddef293d6
2 changed files with 2 additions and 3 deletions
|
@ -8,7 +8,7 @@ before_script:
|
||||||
- touch log/application.log
|
- touch log/application.log
|
||||||
- touch log/test.log
|
- touch log/test.log
|
||||||
- bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
|
- bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
|
||||||
- bundle exec rake db:reset db:create RAILS_ENV=test
|
- RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
|
||||||
|
|
||||||
spec:feature:
|
spec:feature:
|
||||||
script:
|
script:
|
||||||
|
|
|
@ -39,7 +39,6 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
use_db && ActiveRecord::Base.connection.active? &&
|
use_db && ActiveRecord::Base.connection.active? &&
|
||||||
!ActiveRecord::Migrator.needs_migration? &&
|
|
||||||
ActiveRecord::Base.connection.table_exists?('application_settings')
|
ActiveRecord::Base.connection.table_exists?('application_settings')
|
||||||
|
|
||||||
rescue ActiveRecord::NoDatabaseError
|
rescue ActiveRecord::NoDatabaseError
|
||||||
|
|
Loading…
Reference in a new issue