[ARVADOS] updated: ee91e487669c650551c2da450a345ca5c1630081
git at public.curoverse.com
git at public.curoverse.com
Fri Apr 3 17:30:11 EDT 2015
Summary of changes:
.../test/integration/anonymous_access_test.rb | 40 ++++++++++++++++++++++
services/api/test/fixtures/logs.yml | 19 ++++++++++
services/api/test/fixtures/pipeline_instances.yml | 12 ++++---
3 files changed, 66 insertions(+), 5 deletions(-)
via ee91e487669c650551c2da450a345ca5c1630081 (commit)
from 5ea2ee645b5508c9c14cc2abe6cb8c2f24039c83 (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 ee91e487669c650551c2da450a345ca5c1630081
Author: Radhika Chippada <radhika at curoverse.com>
Date: Fri Apr 3 17:29:08 2015 -0400
5365: add integration test to verify Log tab and other unreadable properties are disabled in anonymous view.
diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 0fb21b2..0455dc9 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -179,4 +179,44 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
assert_text 'script version'
assert_no_selector 'a', text: 'Run this pipeline'
end
+
+ [
+ ['pipeline_in_publicly_accessible_project', true],
+ ['pipeline_in_publicly_accessible_project_but_other_objects_elsewhere', false],
+ ['pipeline_in_publicly_accessible_project_but_other_objects_elsewhere', false, 'admin'],
+ ].each do |pipeline_fixture, objects_readable, user=nil|
+ test "accesse #{pipeline_fixture} in public project with objects readable=#{objects_readable} with user #{user}" do
+ pipeline = api_fixture('pipeline_instances')[pipeline_fixture]
+ page = "/pipeline_instances/#{pipeline['uuid']}"
+ if user
+ visit page_with_token user, page
+ else
+ visit page
+ end
+
+ click_link 'foo' # click job link
+
+ if objects_readable or (!objects_readable and user)
+ assert_text 'This pipeline was created from'
+ assert_no_text 'Output data not available'
+ assert_selector 'a', pipeline['components']['foo']['job']['uuid']
+ assert_selector 'a[href="#Log"]', text: 'Log'
+ assert_no_selector 'a[data-toggle="disabled"]', text: 'Log'
+ else
+ assert_no_text 'This pipeline was created from' # template not readable
+ assert_text 'Output data not available'
+ assert_no_selector 'a', text: pipeline['components']['foo']['job']['uuid']
+ assert_text pipeline['job']
+ assert_selector 'a[href="#Log"]', text: 'Log'
+ assert_selector 'a[data-toggle="disabled"]', text: 'Log'
+ end
+
+ click_link 'Log'
+ if objects_readable or (!objects_readable and user)
+ assert_no_text 'foo' # should be in Log tab
+ else
+ assert_text 'foo' # Log tab disabled and hence still in Components tab
+ end
+ end
+ end
end
diff --git a/services/api/test/fixtures/logs.yml b/services/api/test/fixtures/logs.yml
index 06f7a02..cbc775b 100644
--- a/services/api/test/fixtures/logs.yml
+++ b/services/api/test/fixtures/logs.yml
@@ -63,3 +63,22 @@ crunchstat_for_running_job:
updated_at: 2014-11-07 23:33:42.347455000 Z
modified_at: 2014-11-07 23:33:42.347455000 Z
object_owner_uuid: zzzzz-j7d0g-v955i6s2oi1cbso
+
+log_line_for_job_accessible_from_public_project:
+ id: 8
+ uuid: zzzzz-57u5n-tmymyrojrjyhb45
+ owner_uuid: zzzzz-j7d0g-zhxawtyetzwc5f0
+ modified_by_client_uuid: zzzzz-ozdt8-obw7foaks3qjyej
+ modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+ object_uuid: zzzzz-8i9sb-jyq01m7in1jlofj
+ event_at: 2014-11-07 23:33:42.347455000 Z
+ event_type: stderr
+ summary: ~
+ properties:
+ text: '2014-11-07_23:33:41 zzzzz-8i9sb-jyq01m7in1jlofj 31708 1 stderr crunchstat:
+ cpu 1935.4300 user 59.4100 sys 8 cpus -- interval 10.0002 seconds 12.9900 user
+ 0.9900 sys'
+ created_at: 2014-11-07 23:33:42.351913000 Z
+ updated_at: 2014-11-07 23:33:42.347455000 Z
+ modified_at: 2014-11-07 23:33:42.347455000 Z
+ object_owner_uuid: zzzzz-j7d0g-v955i6s2oi1cbso
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index cd2c831..16df171 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -267,15 +267,16 @@ pipeline_in_publicly_accessible_project:
dataclass: Collection
title: foo instance input
job:
- uuid: zzzzz-8i9sb-n7omg50bvt0m1nf
+ uuid: zzzzz-8i9sb-jyq01m7in1jlofj
script_version: master
- log: zzzzz-4zz18-4en62shvi99lxd4
- output: zzzzz-4zz18-4en62shvi99lxd4
+ log: zzzzz-4zz18-uukreo9rbgwsujr
+ output: zzzzz-4zz18-uukreo9rbgwsujr
+ state: Complete
pipeline_in_publicly_accessible_project_but_other_objects_elsewhere:
uuid: zzzzz-d1hrv-pisharednotobjs
owner_uuid: zzzzz-j7d0g-zhxawtyetzwc5f0
- name: Pipeline in publicly accessible project with job and log elsewhere
+ name: Pipeline in public project with other objects elsewhere
pipeline_template_uuid: zzzzz-p5p6p-aox0k0ofxrystgw
state: Complete
created_at: 2014-09-15 12:00:00
@@ -289,10 +290,11 @@ pipeline_in_publicly_accessible_project_but_other_objects_elsewhere:
dataclass: Collection
title: foo instance input
job:
- uuid: zzzzz-8i9sb-pshmckwoma9plh7
+ uuid: zzzzz-8i9sb-aceg2bnq7jt7kon
script_version: master
log: zzzzz-4zz18-bv31uwvy3neko21
output: zzzzz-4zz18-bv31uwvy3neko21
+ state: Complete
pipeline_in_running_state:
name: running_with_job
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list