[ARVADOS] updated: 4c5352de29ca583c41d9babf795983ee4ea3b78e
git at public.curoverse.com
git at public.curoverse.com
Mon Feb 16 08:55:40 EST 2015
Summary of changes:
.../app/controllers/arvados/v1/collections_controller.rb | 2 --
.../functional/arvados/v1/collections_controller_test.rb | 8 ++++++++
services/api/test/integration/collections_api_test.rb | 13 +++++++------
3 files changed, 15 insertions(+), 8 deletions(-)
via 4c5352de29ca583c41d9babf795983ee4ea3b78e (commit)
from 7ef27804d92e2c38ff6b22aab4b113b3e1817bf5 (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 4c5352de29ca583c41d9babf795983ee4ea3b78e
Author: Radhika Chippada <radhika at curoverse.com>
Date: Mon Feb 16 08:54:43 2015 -0500
5186: a few more test assertions.
diff --git a/services/api/app/controllers/arvados/v1/collections_controller.rb b/services/api/app/controllers/arvados/v1/collections_controller.rb
index 321cb72..956de8e 100644
--- a/services/api/app/controllers/arvados/v1/collections_controller.rb
+++ b/services/api/app/controllers/arvados/v1/collections_controller.rb
@@ -1,8 +1,6 @@
require "arvados/keep"
class Arvados::V1::CollectionsController < ApplicationController
- accept_attribute_as_json :properties, Hash
-
def create
if resource_attrs[:uuid] and (loc = Keep::Locator.parse(resource_attrs[:uuid]))
resource_attrs[:portable_data_hash] = loc.to_s
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 3af96e2..9180225 100644
--- a/services/api/test/functional/arvados/v1/collections_controller_test.rb
+++ b/services/api/test/functional/arvados/v1/collections_controller_test.rb
@@ -716,6 +716,14 @@ EOS
end
end
+ test "get collection with properties" do
+ authorize_with :active
+ get :show, {id: collections(:collection_with_one_property).uuid}
+ assert_response :success
+ assert_not_nil json_response['uuid']
+ assert_equal 'value1', json_response['properties']['property1']
+ end
+
test "create collection with properties" do
authorize_with :active
manifest_text = ". d41d8cd98f00b204e9800998ecf8427e 0:0:foo.txt\n"
diff --git a/services/api/test/integration/collections_api_test.rb b/services/api/test/integration/collections_api_test.rb
index 6fba5f7..4251047 100644
--- a/services/api/test/integration/collections_api_test.rb
+++ b/services/api/test/integration/collections_api_test.rb
@@ -279,18 +279,19 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
signed_manifest = Collection.sign_manifest(". bad42fa702ae3ea7d888fef11b46f450+44 0:44:my_test_file.txt\n", api_token(:active))
post "/arvados/v1/collections", {
format: :json,
- collection: {manifest_text: signed_manifest,
- properties: {'property_1' => 'value_1'}}.to_json,
+ collection: {manifest_text: signed_manifest}.to_json,
}, auth(:active)
assert_response 200
assert_not_nil json_response['uuid']
- assert_equal 'value_1', json_response['properties']['property_1']
+ assert_not_nil json_response['properties']
+ assert_empty json_response['properties']
- # get it
- get "/arvados/v1/collections/#{json_response['uuid']}", {
+ # update collection's description
+ put "/arvados/v1/collections/#{json_response['uuid']}", {
format: :json,
+ collection: { properties: {'property_1' => 'value_1'} }
}, auth(:active)
- assert_response 200
+ assert_response :success
assert_equal 'value_1', json_response['properties']['property_1']
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list