Merge branch 'master' into 9372-container-display
[arvados.git] / apps / workbench / test / integration_helper.rb
index 48d2cb5f6d3123513e345a24c5489d2893fb3f2e..785912d3242e303825fce26975fa38b314ac1e88 100644 (file)
@@ -126,6 +126,20 @@ module HeadlessHelper
   end
 end
 
+module KeepWebConfig
+  def getport service
+    File.read(File.expand_path("../../../../tmp/#{service}.port", __FILE__))
+  end
+
+  def use_keep_web_config
+    @kwport = getport 'keep-web-ssl'
+    @kwdport = getport 'keep-web-dl-ssl'
+    Rails.configuration.keep_web_url = "https://localhost:#{@kwport}/c=%{uuid_or_pdh}"
+    Rails.configuration.keep_web_download_url = "https://localhost:#{@kwdport}/c=%{uuid_or_pdh}"
+    CollectionsController.any_instance.expects(:file_enumerator).never
+  end
+end
+
 class ActionDispatch::IntegrationTest
   # Make the Capybara DSL available in all integration tests
   include Capybara::DSL