Merge branch 'master' of git.curoverse.com:arvados into 3408-production-datamanager
[arvados.git] / apps / workbench / test / test_helper.rb
index 65eed789c87fada30b4c6d4a75d2b6d9f9166dcf..2b480f9b3934813400a50850a46dd6367861f751 100644 (file)
@@ -1,4 +1,4 @@
-ENV["RAILS_ENV"] = "test" if (ENV["RAILS_ENV"] != "diagnostics")
+ENV["RAILS_ENV"] = "test" if (ENV["RAILS_ENV"] != "diagnostics" and ENV["RAILS_ENV"] != "performance")
 
 unless ENV["NO_COVERAGE_TEST"]
   begin
@@ -267,6 +267,10 @@ class ActiveSupport::TestCase
 
   protected
   def self.reset_api_fixtures_now
+    # Never try to reset fixtures when we're just using test
+    # infrastructure to run performance/diagnostics suites.
+    return unless Rails.env == 'test'
+
     auth = api_fixture('api_client_authorizations')['admin_trustedclient']
     Thread.current[:arvados_api_token] = auth['api_token']
     ArvadosApiClient.new.api(nil, '../../database/reset', {})