Beispiel #1
0
 def test_build_on_demand_notify_task_pipeline(scenario):
     setattr(scenario, 'overall_status', 0)
     setattr(scenario, 'passed_tasks', ['validate'])
     setattr(scenario, 'failed_tasks', [])
     builder = NotificationPipelineBuilder(trigger='on_demand')
     pipeline = builder.build(scenario, teflo_options={})
     assert getattr(pipeline, 'name') == 'notify'
     assert isinstance(getattr(pipeline, 'tasks'), list)
     assert len(getattr(pipeline, 'tasks')) == 1
     assert getattr(pipeline, 'type') is NotificationTask
Beispiel #2
0
def notify_invalid_pipe_builder():
    return NotificationPipelineBuilder(trigger='null')
Beispiel #3
0
def notify_pipe_builder():
    return NotificationPipelineBuilder(trigger='on_start')