[ARVADOS] updated: 25e33b1caae27d60d8a915b708b431766d9eb7cd
git at public.curoverse.com
git at public.curoverse.com
Tue Jul 8 16:01:23 EDT 2014
Summary of changes:
sdk/cli/bin/arv-run-pipeline-instance | 2 +-
services/api/test/integration/pipeline_test.rb | 36 ++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 services/api/test/integration/pipeline_test.rb
via 25e33b1caae27d60d8a915b708b431766d9eb7cd (commit)
via 8768c4184c17debc00e6b5ea0977da5b4c26c6f0 (commit)
from d23fba84b810714ec2ab41a1501a39a5c665dcd4 (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 25e33b1caae27d60d8a915b708b431766d9eb7cd
Author: Brett Smith <brett at curoverse.com>
Date: Tue Jul 8 16:00:08 2014 -0400
Start API pipeline integration test.
No issue #. I wrote this while debugging the issue in the previous
commit.
diff --git a/services/api/test/integration/pipeline_test.rb b/services/api/test/integration/pipeline_test.rb
new file mode 100644
index 0000000..a550246
--- /dev/null
+++ b/services/api/test/integration/pipeline_test.rb
@@ -0,0 +1,36 @@
+require 'test_helper'
+
+class PipelineTest < ActionDispatch::IntegrationTest
+ # These tests simulate the workflow of arv-run-pipeline-instance
+ # and other pipeline-running code.
+
+ def check_component_match(comp_key, comp_hash)
+ assert_response :success
+ built_json = json_response
+ built_component = built_json["components"][comp_key]
+ comp_hash.each_pair do |key, expected|
+ assert_equal(expected, built_component[key.to_s],
+ "component's #{key} field changed")
+ end
+ end
+
+ test "creating a pipeline instance preserves required component parameters" do
+ comp_name = "test_component"
+ component = {
+ repository: "test_repo",
+ script: "test_script",
+ script_version: "test_refspec",
+ script_parameters: {},
+ }
+
+ post("/arvados/v1/pipeline_instances",
+ {pipeline_instance: {components: {comp_name => component}}.to_json},
+ auth(:active))
+ check_component_match(comp_name, component)
+ pi_uuid = json_response["uuid"]
+
+ @response = nil
+ get("/arvados/v1/pipeline_instances/#{pi_uuid}", {}, auth(:active))
+ check_component_match(comp_name, component)
+ end
+end
commit 8768c4184c17debc00e6b5ea0977da5b4c26c6f0
Author: Brett Smith <brett at curoverse.com>
Date: Tue Jul 8 15:59:39 2014 -0400
3209: arv-run-pipeline-instance sends instance body as JSON.
If we don't encode the body as JSON ourselves, the API client library
will omit empty attributes. This can cause required component
attributes like script_parameters to be lost, so we need to circumvent
that behavior. It also seems safe, since we already do the same
encoding in the update method. Closes #3209.
diff --git a/sdk/cli/bin/arv-run-pipeline-instance b/sdk/cli/bin/arv-run-pipeline-instance
index fecee0b..974e967 100755
--- a/sdk/cli/bin/arv-run-pipeline-instance
+++ b/sdk/cli/bin/arv-run-pipeline-instance
@@ -244,7 +244,7 @@ class PipelineInstance
def self.create(attributes)
result = $client.execute(:api_method => $arvados.pipeline_instances.create,
:body => {
- :pipeline_instance => attributes
+ :pipeline_instance => attributes.to_json
},
:authenticated => false,
:headers => {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list