[ARVADOS] updated: 135f306e75cb61e1153b3590b71c32ef497404ed
git at public.curoverse.com
git at public.curoverse.com
Fri May 30 17:13:41 EDT 2014
Summary of changes:
.../arvados/v1/pipeline_instances_controller.rb | 1 +
.../test/integration/serialized_encoding_test.rb | 27 ++++++++++++++++++++++
2 files changed, 28 insertions(+)
create mode 100644 services/api/test/integration/serialized_encoding_test.rb
via 135f306e75cb61e1153b3590b71c32ef497404ed (commit)
from b6ea1fe3bf38bf28823c80b3aef98239a1c0311b (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 135f306e75cb61e1153b3590b71c32ef497404ed
Author: Tom Clegg <tom at curoverse.com>
Date: Fri May 30 17:12:34 2014 -0400
2893: Fix accepting JSON-encoded components_summary in API calls. refs #2893
diff --git a/services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb b/services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb
index 8f0b93f..9781caf 100644
--- a/services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb
+++ b/services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb
@@ -1,4 +1,5 @@
class Arvados::V1::PipelineInstancesController < ApplicationController
+ accept_attribute_as_json :components_summary, Hash
accept_attribute_as_json :components, Hash
accept_attribute_as_json :properties, Hash
end
diff --git a/services/api/test/integration/serialized_encoding_test.rb b/services/api/test/integration/serialized_encoding_test.rb
new file mode 100644
index 0000000..10b9435
--- /dev/null
+++ b/services/api/test/integration/serialized_encoding_test.rb
@@ -0,0 +1,27 @@
+require 'test_helper'
+
+class SerializedEncodingTest < ActionDispatch::IntegrationTest
+ fixtures :all
+
+ test "store json-encoded link with properties hash" do
+ post "/arvados/v1/links", {
+ :link => {
+ :link_class => 'test',
+ :name => 'test',
+ :properties => {:foo => :bar}
+ }.to_json,
+ :format => :json
+ }, auth(:active)
+ assert_response :success
+ end
+
+ test "store json-encoded pipeline instance with components_summary hash" do
+ post "/arvados/v1/pipeline_instances", {
+ :pipeline_instance => {
+ :components_summary => {:todo => 0}
+ }.to_json,
+ :format => :json
+ }, auth(:active)
+ assert_response :success
+ end
+end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list