mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 23:28:21 +08:00
DEV: run db:create and db:migrate on turbo specs
This ensures multisite specs run correctly when running ./bin/turbo_rspec
This commit is contained in:
@ -112,14 +112,11 @@ task 'docker:test' do
|
|||||||
# for js tests
|
# for js tests
|
||||||
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]
|
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]
|
||||||
|
|
||||||
db_rake_task_prefix =
|
@good &&= run_or_fail("bundle exec rake db:create")
|
||||||
if ENV['USE_TURBO']
|
|
||||||
'parallel'
|
|
||||||
else
|
|
||||||
'db'
|
|
||||||
end
|
|
||||||
|
|
||||||
@good &&= run_or_fail("bundle exec rake #{db_rake_task_prefix}:create")
|
if ENV['USE_TURBO']
|
||||||
|
@good &&= run_or_fail("bundle exec rake parallel:create")
|
||||||
|
end
|
||||||
|
|
||||||
if ENV["INSTALL_OFFICIAL_PLUGINS"]
|
if ENV["INSTALL_OFFICIAL_PLUGINS"]
|
||||||
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
|
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
|
||||||
@ -136,7 +133,11 @@ task 'docker:test' do
|
|||||||
"LOAD_PLUGINS=1 "
|
"LOAD_PLUGINS=1 "
|
||||||
end
|
end
|
||||||
|
|
||||||
@good &&= run_or_fail("#{command_prefix}bundle exec rake #{db_rake_task_prefix}:migrate")
|
@good &&= run_or_fail("#{command_prefix}bundle exec rake db:migrate")
|
||||||
|
|
||||||
|
if ENV['USE_TURBO']
|
||||||
|
@good &&= run_or_fail("bundle exec rake parallel:migrate")
|
||||||
|
end
|
||||||
|
|
||||||
puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]
|
puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user