3 class Arvados::V1::PipelineInstancesControllerTest < ActionController::TestCase
5 test 'create pipeline with components copied from template' do
9 pipeline_template_uuid: pipeline_templates(:two_part).uuid
12 assert_response :success
13 assert_equal(pipeline_templates(:two_part).components.to_json,
14 assigns(:object).components.to_json)
17 test 'create pipeline with no template' do
18 authorize_with :active
24 assert_response :success
25 assert_equal({}, assigns(:object).components)
32 test "cancel a pipeline instance with cascade=#{cascade}" do
33 authorize_with :active
34 pi_uuid = pipeline_instances(:job_child_pipeline_with_components_at_level_2).uuid
36 post :cancel, {id: pi_uuid, cascade: cascade}
37 assert_response :success
39 pi = PipelineInstance.where(uuid: pi_uuid).first
40 assert_equal "Paused", pi.state
42 children = Job.where(uuid: ['zzzzz-8i9sb-job1atlevel3noc', 'zzzzz-8i9sb-job2atlevel3noc'])
43 children.each do |child|
44 assert_equal ("Cancelled" == child.state), cascade