[ARVADOS] updated: cca78a112d6a2aa4f76c1956cfe8ec2d43a68759
Git user
git at public.curoverse.com
Fri Feb 24 14:21:57 EST 2017
Summary of changes:
sdk/cwl/arvados_cwl/__init__.py | 4 ++++
services/api/app/models/container.rb | 10 ++++++----
services/api/app/models/container_request.rb | 4 +++-
services/api/test/fixtures/collections.yml | 30 ++++++++++++++++++++++++++++
services/api/test/unit/container_test.rb | 29 +++++++++++++++++++++++++++
5 files changed, 72 insertions(+), 5 deletions(-)
via cca78a112d6a2aa4f76c1956cfe8ec2d43a68759 (commit)
via b86728d23fa94fa80460be443e3e963376bc47d9 (commit)
via a04b28a606d52b066a00d4e960bf351df5cb9c6f (commit)
via a6e4bcccfd646843ba35c9a79367f9bbd7124f8d (commit)
from c702045c2d8ab4ce332b279018ed3128a688be6c (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 cca78a112d6a2aa4f76c1956cfe8ec2d43a68759
Merge: c702045 b86728d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Feb 24 14:21:52 2017 -0500
Merge branch '9277-container-output' closes #9277
commit b86728d23fa94fa80460be443e3e963376bc47d9
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Feb 24 14:20:15 2017 -0500
9277: Add test that setting trashed, unreable collection is disallowed.
diff --git a/services/api/test/fixtures/collections.yml b/services/api/test/fixtures/collections.yml
index 6db6d78..5f7bad8 100644
--- a/services/api/test/fixtures/collections.yml
+++ b/services/api/test/fixtures/collections.yml
@@ -299,6 +299,21 @@ unique_expired_collection:
manifest_text: ". 29d7797f1888013986899bc9083783fa+3 0:3:expired\n"
name: unique_expired_collection
+unique_expired_collection2:
+ uuid: zzzzz-4zz18-mto52zx1s7sn3jr
+ portable_data_hash: 4ad199f90029935844dc3f098f4fca2b+49
+ owner_uuid: zzzzz-tpzed-000000000000000
+ created_at: 2014-02-03T17:22:54Z
+ modified_by_client_uuid: zzzzz-ozdt8-brczlopd8u8d0jr
+ modified_by_user_uuid: zzzzz-tpzed-d9tiejq69daie8f
+ modified_at: 2014-02-03T17:22:54Z
+ updated_at: 2014-02-03T17:22:54Z
+ is_trashed: true
+ trash_at: 2001-01-01T00:00:00Z
+ delete_at: 2038-01-01T00:00:00Z
+ manifest_text: ". 29d7797f1888013986899bc9083783fa+3 0:3:expired\n"
+ name: unique_expired_collection2
+
# a collection with a log file that can be parsed by the log viewer
# This collection hash matches the following log text:
# 2014-01-01_12:00:01 zzzzz-8i9sb-abcdefghijklmno 0 log message 1
diff --git a/services/api/test/unit/container_test.rb b/services/api/test/unit/container_test.rb
index 4177de4..5a19f05 100644
--- a/services/api/test/unit/container_test.rb
+++ b/services/api/test/unit/container_test.rb
@@ -519,4 +519,20 @@ class ContainerTest < ActiveSupport::TestCase
assert c.update_attributes! state: Container::Complete
end
+ test "not allowed to set trashed output that is not readable by current user" do
+ c, _ = minimal_new
+ set_user_from_auth :dispatch1
+ c.lock
+ c.update_attributes! state: Container::Running
+
+ output = Collection.unscoped.find_by_uuid('zzzzz-4zz18-mto52zx1s7sn3jr')
+
+ Thread.current[:api_client_authorization] = ApiClientAuthorization.find_by_uuid(c.auth_uuid)
+ Thread.current[:user] = User.find_by_id(Thread.current[:api_client_authorization].user_id)
+
+ assert_raises ActiveRecord::RecordInvalid do
+ c.update_attributes! output: output.portable_data_hash
+ end
+ end
+
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list