Example #1
0
def test_get_runnable_steps_many_many_downstream_deps_run(pipeline_steps):
    downstream_dep = PipelineStep(uid='another_downstream_dep', url='http://null', params={}, requires=[])
    pipeline_steps.append(downstream_dep)

    pipeline_steps[0].state = 'completed'
    runnables = get_runnable_steps(pipeline_steps)
    assert [r.uid for r in runnables] == ['signoff2', 'another_downstream_dep']
Example #2
0
def test_get_runnable_steps_many_can_run_at_the_beginning(pipeline_steps):
    another_first_step = PipelineStep(uid='parallel_action_to_signoff1',
                                      url='http://null',
                                      params={},
                                      requires=[])
    pipeline_steps.append(another_first_step)
    runnables = get_runnable_steps(pipeline_steps)
    assert [r.uid
            for r in runnables] == ['signoff1', 'parallel_action_to_signoff1']
Example #3
0
def test_get_runnable_steps_many_upstream_dependencies(pipeline_steps):
    upstream_dep = PipelineStep(uid='upstream_dep', url='http://null', params={}, requires=[])
    upstream_dep.state = 'completed'
    pipeline_steps[1].requires.append(upstream_dep.uid)
    pipeline_steps.append(upstream_dep)

    runnables = get_runnable_steps(pipeline_steps)
    assert [r.uid for r in runnables] == ['signoff1']

    pipeline_steps[0].state = 'completed'
    runnables = get_runnable_steps(pipeline_steps)
    assert [r.uid for r in runnables] == ['signoff2']