From 787c47f7e1b2e9cdc4236c3052e34125259feb7f Mon Sep 17 00:00:00 2001 From: radhika Date: Tue, 16 Sep 2014 22:35:12 -0400 Subject: [PATCH] 2761: minor updates to diagnostics test config explanation. --- apps/workbench/config/application.default.yml | 2 +- apps/workbench/test/diagnostics_test_helper.rb | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/workbench/config/application.default.yml b/apps/workbench/config/application.default.yml index 22ed3a340f..e43d94b225 100644 --- a/apps/workbench/config/application.default.yml +++ b/apps/workbench/config/application.default.yml @@ -15,7 +15,7 @@ # max_wait_seconds: max time in seconds to wait for the pipeline run to complete. # Default value of 30 seconds is used when this value is not provided. diagnostics: - arvados_workbench_url: https://localhost:3000/ + arvados_workbench_url: https://localhost:3000 user_tokens: active: eu33jurqntstmwo05h1jr3eblmi961e802703y6657s8zb14r pipelines_to_test: diff --git a/apps/workbench/test/diagnostics_test_helper.rb b/apps/workbench/test/diagnostics_test_helper.rb index 55821ed21d..392e7d0fd0 100644 --- a/apps/workbench/test/diagnostics_test_helper.rb +++ b/apps/workbench/test/diagnostics_test_helper.rb @@ -1,14 +1,19 @@ require 'integration_helper' require 'yaml' +# Diagnostics tests are executed when "RAILS_ENV=diagnostics" is used. +# When "RAILS_ENV=test" is used, tests in the "diagnostics" directory +# will not be executed. + class DiagnosticsTest < ActionDispatch::IntegrationTest def visit_page_with_token token_name, path='/' - if !path.start_with? Rails.configuration.arvados_workbench_url - path = Rails.configuration.arvados_workbench_url + path + workbench_url = Rails.configuration.arvados_workbench_url + if workbench_url.end_with? '/' + workbench_url = workbench_url[0, workbench_url.size-1] end tokens = Rails.configuration.user_tokens - visit page_with_token(tokens[token_name], path) + visit page_with_token(tokens[token_name], (workbench_url + path)) end def wait_until_page_has text_to_look_for, max_time=30 -- 2.30.2