From 67605b55d54cf97038da664159b9280454c747db Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 10 Dec 2019 16:03:23 +0000 Subject: [PATCH] DEV: Prevent plugin loading when running core db migrations in tests This is required because bin/rake automatically loads plugins when migrating. In our continuous integration, we don't want plugins to break the core build. They should only be loaded for the plugin build. --- lib/tasks/docker.rake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake index a5cefd3d3a2..1b74d3ee20c 100644 --- a/lib/tasks/docker.rake +++ b/lib/tasks/docker.rake @@ -129,7 +129,8 @@ task 'docker:test' do command_prefix = if ENV["SKIP_PLUGINS"] - "" + # Make sure not to load plugins. bin/rake will add LOAD_PLUGINS=1 automatically unless we set it to 0 explicitly + "LOAD_PLUGINS=0 " else "LOAD_PLUGINS=1 " end @@ -137,7 +138,7 @@ task 'docker:test' do @good &&= run_or_fail("#{command_prefix}bundle exec rake db:migrate") if ENV['USE_TURBO'] - @good &&= run_or_fail("bundle exec rake parallel:migrate") + @good &&= run_or_fail("#{command_prefix}bundle exec rake parallel:migrate") end puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]