1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
7 class PipelineIntegrationTest < ActionDispatch::IntegrationTest
8 # These tests simulate the workflow of arv-run-pipeline-instance
9 # and other pipeline-running code.
11 def check_component_match(comp_key, comp_hash)
12 assert_response :success
13 built_json = json_response
14 built_component = built_json["components"][comp_key]
15 comp_hash.each_pair do |key, expected|
16 assert_equal(expected, built_component[key.to_s],
17 "component's #{key} field changed")
21 test "creating a pipeline instance preserves required component parameters" do
22 comp_name = "test_component"
24 repository: "test_repo",
25 script: "test_script",
26 script_version: "test_refspec",
27 script_parameters: {},
30 post("/arvados/v1/pipeline_instances",
33 components: {comp_name => component}
36 headers: auth(:active))
37 check_component_match(comp_name, component)
38 pi_uuid = json_response["uuid"]
41 get("/arvados/v1/pipeline_instances/#{pi_uuid}", params: {}, headers: auth(:active))
42 check_component_match(comp_name, component)