[ARVADOS] updated: d2ceffb29e8c3035ddaaf18c606ef73b60ca283a
Git user
git at public.curoverse.com
Wed Oct 19 17:18:55 EDT 2016
Summary of changes:
.../views/work_units/_component_detail.html.erb | 1 +
.../test/controllers/work_units_controller_test.rb | 23 --------------------
apps/workbench/test/integration/work_units_test.rb | 25 ++++++++++++++++++++++
3 files changed, 26 insertions(+), 23 deletions(-)
via d2ceffb29e8c3035ddaaf18c606ef73b60ca283a (commit)
from e07988fd545ad804960d14f255640fed743f5a8b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d2ceffb29e8c3035ddaaf18c606ef73b60ca283a
Author: radhika <radhika at curoverse.com>
Date: Wed Oct 19 17:17:56 2016 -0400
10079: checking log_link on children needs to be an integration test.
diff --git a/apps/workbench/app/views/work_units/_component_detail.html.erb b/apps/workbench/app/views/work_units/_component_detail.html.erb
index 0085611..1ec5c32 100644
--- a/apps/workbench/app/views/work_units/_component_detail.html.erb
+++ b/apps/workbench/app/views/work_units/_component_detail.html.erb
@@ -24,6 +24,7 @@
<% val = current_obj.send(k) if current_obj.respond_to?(k) %>
<% has_val = val %>
<% has_val = val.andand.any? if k == :outputs %>
+ <% has_val = true if k == :log_collection and current_obj.state_label == "Running" %>
<% if has_val %>
<tr>
<td style="padding-right: 1em">
diff --git a/apps/workbench/test/controllers/work_units_controller_test.rb b/apps/workbench/test/controllers/work_units_controller_test.rb
index ee18861..12e0271 100644
--- a/apps/workbench/test/controllers/work_units_controller_test.rb
+++ b/apps/workbench/test/controllers/work_units_controller_test.rb
@@ -65,27 +65,4 @@ class WorkUnitsControllerTest < ActionController::TestCase
}]
get :index, encoded_params, session_for(:active)
end
-
- [
- [Job, 'active', 'running_job_with_components', '/jobs/zzzzz-8i9sb-jyq01m7in1jlofj#Log'],
- [PipelineInstance, 'active', 'pipeline_in_running_state', '/jobs/zzzzz-8i9sb-pshmckwoma9plh7#Log'],
- [PipelineInstance, nil, 'pipeline_in_publicly_accessible_project_but_other_objects_elsewhere', 'Log unavailable'],
- ].each do |type, token, fixture, log_link|
- test "link_to_log for #{fixture} for #{token}" do
- use_token 'admin'
- obj = find_fixture(type, fixture)
-
- @controller = if type == Job then JobsController.new else PipelineInstancesController.new end
-
- if token
- get :show, {id: obj['uuid']}, session_for(token)
- else
- Rails.configuration.anonymous_user_token =
- api_fixture("api_client_authorizations", "anonymous", "api_token")
- get :show, {id: obj['uuid']}
- end
-
- assert_includes @response.body, log_link
- end
- end
end
diff --git a/apps/workbench/test/integration/work_units_test.rb b/apps/workbench/test/integration/work_units_test.rb
index b1d5a21..f04616d 100644
--- a/apps/workbench/test/integration/work_units_test.rb
+++ b/apps/workbench/test/integration/work_units_test.rb
@@ -207,4 +207,29 @@ class WorkUnitsTest < ActionDispatch::IntegrationTest
assert_text(expect_log_text)
end
end
+
+ [
+ ['jobs', 'active', 'running_job_with_components', 'component1', '/jobs/zzzzz-8i9sb-jyq01m7in1jlofj#Log'],
+ ['pipeline_instances', 'active', 'pipeline_in_running_state', 'foo', '/jobs/zzzzz-8i9sb-pshmckwoma9plh7#Log'],
+ ['pipeline_instances', nil, 'pipeline_in_publicly_accessible_project_but_other_objects_elsewhere', 'foo', 'Log unavailable'],
+ ].each do |type, token, fixture, child, log_link|
+ test "link_to_log for #{fixture} for #{token}" do
+ obj = api_fixture(type)[fixture]
+ if token
+ visit page_with_token token, "/#{type}/#{obj['uuid']}"
+ else
+ Rails.configuration.anonymous_user_token =
+ api_fixture("api_client_authorizations", "anonymous", "api_token")
+ visit "/#{type}/#{obj['uuid']}"
+ end
+
+ click_link(child)
+
+ if token
+ assert_selector "a[href=\"#{log_link}\"]"
+ else
+ assert_text log_link
+ end
+ end
+ end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list