20259: Add documentation for banner and tooltip features
[arvados.git] / apps / workbench / test / performance_test_helper.rb
index 7c4035406b40302e91b7c2e2f0148b4aace1fbff..c3b50c2e24a3a2440e28a500d48b4cc6789e40bf 100644 (file)
@@ -1,20 +1,25 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 require 'integration_helper'
 
-# Performance test can run in two two different ways:
+# Performance test can run in two different ways:
 #
 # 1. Similar to other integration tests using the command:
 #     RAILS_ENV=test bundle exec rake test:benchmark
 #
 # 2. Against a configured workbench url using "RAILS_ENV=performance".
-#     RAILS_ENV=performance bundle exec rake TEST=test/performance/*.rb
+#     RAILS_ENV=performance bundle exec rake test:benchmark
 
 class WorkbenchPerformanceTest < ActionDispatch::PerformanceTest
 
-  # When running in "RAILS_ENV=performance" mode, uses performance config params.
-  # In this mode, prepends workbench URL to the given path provided,
-  # and visits that page using the configured "user_token".
+  # When running in "RAILS_ENV=performance" mode, uses performance
+  # config params.  In this mode, prepends workbench URL to the given
+  # path provided, and visits that page using the configured
+  # "user_token".
   def visit_page_with_token path='/'
-    if ENV["RAILS_ENV"].eql? 'performance'
+    if Rails.env == 'performance'
       token = Rails.configuration.user_token
       workbench_url = Rails.configuration.arvados_workbench_url
       if workbench_url.end_with? '/'
@@ -28,9 +33,4 @@ class WorkbenchPerformanceTest < ActionDispatch::PerformanceTest
     visit page_with_token(token, (workbench_url + path))
   end
 
-  # We do not want to reset the database fixtures in "RAILS_ENV=performance" mode.
-  protected
-  def self.reset_api_fixtures_now
-  end
-
 end