DEV: skip creating multisite db when running JS tests only

DEV: skip creating multisite db when running JS tests only

diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake
index 1d1c5fa..f6fc6e6 100644
--- a/lib/tasks/db.rake
+++ b/lib/tasks/db.rake
@@ -29,7 +29,7 @@ end
 task 'db:migrate', [:multisite] => ['environment', 'set_locale'] do |_, args|
   SeedFu.seed(DiscoursePluginRegistry.seed_paths)
 
-  if Rails.env.test? && !args[:multisite]
+  if Rails.env.test? && !args[:multisite] && !ENV["SKIP_MULTISITE"]
     system("rails db:schema:dump")
     system("MULTISITE=multisite rails db:schema:load")
     system("RAILS_DB=discourse_test_multisite rails db:migrate['multisite']")
diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rake
index 78ab72b..c60a7fb 100644
--- a/lib/tasks/docker.rake
+++ b/lib/tasks/docker.rake
@@ -107,6 +107,10 @@ 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

GitHub sha: 60031337