[ARVADOS] updated: 4cb76110db20ce1e74f49d2fb7f5bb79c8c7d347

git at public.curoverse.com git at public.curoverse.com
Mon Apr 6 11:04:43 EDT 2015


Summary of changes:
 .../test/integration/anonymous_access_test.rb      | 42 +++++++++++++++-------
 sdk/python/arvados/_ranges.py                      |  9 +++--
 sdk/python/arvados/util.py                         |  4 ++-
 services/api/test/fixtures/jobs.yml                | 16 +++++++++
 services/api/test/fixtures/logs.yml                | 25 +++++++++++--
 services/api/test/fixtures/pipeline_instances.yml  |  4 +--
 6 files changed, 80 insertions(+), 20 deletions(-)

       via  4cb76110db20ce1e74f49d2fb7f5bb79c8c7d347 (commit)
       via  2e56b93e61dc1ce0ee0d3d5e138259e073770b99 (commit)
       via  70e171aa36234cc476f8056725b6269fda2f037d (commit)
       via  635229a6fc82daa82729f602612054616874916f (commit)
       via  e88eac059d0c9088edf4d3f60734c4804d7ca500 (commit)
      from  ee91e487669c650551c2da450a345ca5c1630081 (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 4cb76110db20ce1e74f49d2fb7f5bb79c8c7d347
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Apr 6 11:04:11 2015 -0400

    5365: couple more integration tests to access Log tab from within the Job page.

diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 62342ad..2867f15 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -184,29 +184,45 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
     ['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']}"
+
+    ['completed_job_in_publicly_accessible_project', true],
+    ['job_in_publicly_accessible_project_but_other_objects_elsewhere', false],
+  ].each do |fixture, objects_readable, user=nil|
+    test "access #{fixture} in public project with objects readable=#{objects_readable} with user #{user}" do
+      pipeline_page = true if fixture.include?('pipeline')
+  
+      if pipeline_page
+        object = api_fixture('pipeline_instances')[fixture]
+        page = "/pipeline_instances/#{object['uuid']}"
+      else      # job
+        object = api_fixture('jobs')[fixture]
+        page = "/jobs/#{object['uuid']}"
+      end
+
       if user
         visit page_with_token user, page
       else
         visit page
       end
 
-      click_link 'foo'  # click job link
+      # click job link, if in pipeline page
+      click_link 'foo' if pipeline_page
 
       if objects_readable or (!objects_readable and user)
-        assert_text 'This pipeline was created from'
+        if pipeline_page
+          assert_text 'This pipeline was created from'
+          assert_selector 'a', object['components']['foo']['job']['uuid']
+        end
         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
+        if pipeline_page
+          assert_no_text 'This pipeline was created from'  # template is not readable
+          assert_no_selector 'a', text: object['components']['foo']['job']['uuid']
+        end
         assert_text 'Output data not available'
-        assert_no_selector 'a', text: pipeline['components']['foo']['job']['uuid']
-        assert_text pipeline['job']
+        assert_text object['job']
         assert_selector 'a[href="#Log"]', text: 'Log'
         assert_selector 'a[data-toggle="disabled"]', text: 'Log'
       end
@@ -214,9 +230,9 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
       click_link 'Log'
       if objects_readable or user
         assert_no_text 'foo'  # should be in Log tab
-        assert_text 'stderr crunchstat'  # log line
+        assert_text 'stderr crunchstat'   if pipeline_page
       else
-        assert_text 'foo'     # Log tab disabled and hence still in Components tab
+        assert_text 'foo'     # Log tab disabled and hence still in first tab
         assert_no_text 'stderr crunchstat'  # log line shouldn't be seen
       end
     end
diff --git a/services/api/test/fixtures/jobs.yml b/services/api/test/fixtures/jobs.yml
index ea6cbb0..c662062 100644
--- a/services/api/test/fixtures/jobs.yml
+++ b/services/api/test/fixtures/jobs.yml
@@ -425,6 +425,22 @@ completed_job_in_publicly_accessible_project:
   script_parameters:
     input: fa7aeb5140e2848d39b416daeef4ffc5+45
     input2: "stuff2"
+  log: ~
+  output: b519d9cb706a29fc7ea24dbea2f05851+93
+
+job_in_publicly_accessible_project_but_other_objects_elsewhere:
+  uuid: zzzzz-8i9sb-jyq01muyhgr4ofj
+  owner_uuid: zzzzz-j7d0g-zhxawtyetzwc5f0
+  modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  repository: active/foo
+  script: completed_job_script
+  script_version: 4fe459abe02d9b365932b8f5dc419439ab4e2577
+  state: Complete
+  script_parameters:
+    input: fa7aeb5140e2848d39b416daeef4ffc5+45
+    input2: "stuff2"
+  log: zzzzz-4zz18-fy296fx3hot09f7
+  output: zzzzz-4zz18-bv31uwvy3neko21
 
 # Test Helper trims the rest of the file
 

commit 2e56b93e61dc1ce0ee0d3d5e138259e073770b99
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Apr 6 10:15:39 2015 -0400

    5365: additional test assertions for pipeline log tab display

diff --git a/apps/workbench/test/integration/anonymous_access_test.rb b/apps/workbench/test/integration/anonymous_access_test.rb
index 0455dc9..62342ad 100644
--- a/apps/workbench/test/integration/anonymous_access_test.rb
+++ b/apps/workbench/test/integration/anonymous_access_test.rb
@@ -212,10 +212,12 @@ class AnonymousAccessTest < ActionDispatch::IntegrationTest
       end
 
       click_link 'Log'
-      if objects_readable or (!objects_readable and user)
+      if objects_readable or user
         assert_no_text 'foo'  # should be in Log tab
+        assert_text 'stderr crunchstat'  # log line
       else
         assert_text 'foo'     # Log tab disabled and hence still in Components tab
+        assert_no_text 'stderr crunchstat'  # log line shouldn't be seen
       end
     end
   end
diff --git a/services/api/test/fixtures/logs.yml b/services/api/test/fixtures/logs.yml
index cbc775b..aea7980 100644
--- a/services/api/test/fixtures/logs.yml
+++ b/services/api/test/fixtures/logs.yml
@@ -64,18 +64,37 @@ crunchstat_for_running_job:
   modified_at: 2014-11-07 23:33:42.347455000 Z
   object_owner_uuid: zzzzz-j7d0g-v955i6s2oi1cbso
 
-log_line_for_job_accessible_from_public_project:
+log_line_for_pipeline_in_publicly_accessible_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
+  object_uuid: zzzzz-d1hrv-n68vc490mloy4fi
   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:
+    text: '2014-11-07_23:33:41 zzzzz-d1hrv-n68vc490mloy4fi 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
+
+log_line_for_pipeline_in_publicly_accessible_project_but_other_objects_elsewhere:
+  id: 9
+  uuid: zzzzz-57u5n-tmyhy56k9lnhb45
+  owner_uuid: zzzzz-j7d0g-v955i6s2oi1cbso
+  modified_by_client_uuid: zzzzz-ozdt8-obw7foaks3qjyej
+  modified_by_user_uuid: zzzzz-tpzed-xurymjxw79nv3jz
+  object_uuid: zzzzz-d1hrv-pisharednotobjs
+  event_at: 2014-11-07 23:33:42.347455000 Z
+  event_type: stderr
+  summary: ~
+  properties:
+    text: '2014-11-07_23:33:41 zzzzz-d1hrv-pisharednotobjs 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
diff --git a/services/api/test/fixtures/pipeline_instances.yml b/services/api/test/fixtures/pipeline_instances.yml
index 16df171..d71585f 100644
--- a/services/api/test/fixtures/pipeline_instances.yml
+++ b/services/api/test/fixtures/pipeline_instances.yml
@@ -269,8 +269,8 @@ pipeline_in_publicly_accessible_project:
       job:
         uuid: zzzzz-8i9sb-jyq01m7in1jlofj
         script_version: master
-        log: zzzzz-4zz18-uukreo9rbgwsujr
-        output: zzzzz-4zz18-uukreo9rbgwsujr
+        log: zzzzz-4zz18-4en62shvi99lxd4
+        output: b519d9cb706a29fc7ea24dbea2f05851+93
         state: Complete
 
 pipeline_in_publicly_accessible_project_but_other_objects_elsewhere:

commit 70e171aa36234cc476f8056725b6269fda2f037d
Merge: ee91e48 635229a
Author: Radhika Chippada <radhika at curoverse.com>
Date:   Mon Apr 6 09:25:47 2015 -0400

    Merge branch 'master' into 5365-not-link-unreadables


-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list