DEV: Make setting up of multisite DB in test env clearer.

This commit is contained in:
Guo Xiang Tan
2019-03-21 09:50:16 +08:00
parent 600313373b
commit 8e5e5d7d35
3 changed files with 25 additions and 20 deletions

View File

@ -100,6 +100,9 @@ task 'docker:test' do
@pg_pid = Process.spawn("#{@postgres_bin}postmaster -D tmp/test_data/pg")
ENV["RAILS_ENV"] = "test"
# this shaves all the creation of the multisite db off
# for js tests
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]
@good &&= run_or_fail("bundle exec rake db:create")
@ -107,10 +110,6 @@ task 'docker:test' do
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
end
# this shaves all the creation of the multisite db off
# for js tests
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]
if ENV["SKIP_PLUGINS"]
@good &&= run_or_fail("bundle exec rake db:migrate")
else