[ARVADOS] updated: 1.2.0-72-g652e26fee
Git user
git at public.curoverse.com
Thu Oct 4 17:56:54 EDT 2018
Summary of changes:
.../controllers/arvados/v1/collections_controller.rb | 5 +++++
.../arvados/v1/collections_controller_test.rb | 19 +++++++++++++++++++
.../functional/arvados/v1/schema_controller_test.rb | 2 +-
3 files changed, 25 insertions(+), 1 deletion(-)
via 652e26feea271a3d86430cd494503ff96e11dc9f (commit)
from a18fe628853e2042bb104088dd586cb8f41adcef (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 652e26feea271a3d86430cd494503ff96e11dc9f
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Thu Oct 4 18:55:40 2018 -0300
13561: Ignore version & current_version_uuid parama on API create endpoint.
Also, updated discovery doc to include 'include_old_versions' param on index.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index cfd1e9dc2..1d4ade6dd 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -15,6 +15,9 @@ class Arvados::V1::CollectionsController < ApplicationController
include_trash: {
type: 'boolean', required: false, description: "Include collections whose is_trashed attribute is true."
},
+ include_old_versions: {
+ type: 'boolean', required: false, description: "Include past collection versions."
+ },
})
end
@@ -23,6 +26,8 @@ class Arvados::V1::CollectionsController < ApplicationController
resource_attrs[:portable_data_hash] = loc.to_s
resource_attrs.delete :uuid
end
+ resource_attrs.delete :version
+ resource_attrs.delete :current_version_uuid
super
end
diff --git a/services/api/test/functional/arvados/v1/collections_controller_test.rb b/services/api/test/functional/arvados/v1/collections_controller_test.rb
index 24a1a09cf..2b595a115 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -1173,4 +1173,23 @@ EOS
'response includes a version from a different collection'
end
end
+
+ test 'version and current_version_uuid are ignored at creation time' do
+ permit_unsigned_manifests
+ authorize_with :active
+ manifest_text = ". d41d8cd98f00b204e9800998ecf8427e 0:0:foo.txt\n"
+ post :create, {
+ collection: {
+ name: 'Test collection',
+ version: 42,
+ current_version_uuid: collections(:collection_owned_by_active).uuid,
+ manifest_text: manifest_text,
+ # portable_data_hash: "d30fe8ae534397864cb96c544f4cf102+47"
+ }
+ }
+ assert_response :success
+ resp = JSON.parse(@response.body)
+ assert_equal 1, resp['version']
+ assert_equal resp['uuid'], resp['current_version_uuid']
+ end
end
diff --git a/services/api/test/functional/arvados/v1/schema_controller_test.rb b/services/api/test/functional/arvados/v1/schema_controller_test.rb
index 40868c87b..53c1ed72e 100644
--- a/services/api/test/functional/arvados/v1/schema_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/schema_controller_test.rb
@@ -101,7 +101,7 @@ class Arvados::V1::SchemaControllerTest < ActionController::TestCase
specimens_index_params = discovery_doc['resources']['specimens']['methods']['index']['parameters'] # no changes from super
coll_index_params = discovery_doc['resources']['collections']['methods']['index']['parameters']
- assert_equal coll_index_params.keys.sort, (specimens_index_params.keys + ['include_trash']).sort
+ assert_equal (specimens_index_params.keys + ['include_trash', 'include_old_versions']).sort, coll_index_params.keys.sort
include_trash_param = coll_index_params['include_trash']
assert_equal 'boolean', include_trash_param['type']
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list