Пример #1
0
    def _execute_test_action(self, manager, my_vcr, session_fixture):
        with my_vcr.use_cassette("stage/stage_cancel") as cass:
            if not len(cass.requests):
                with my_vcr.use_cassette("stage/schedule_with_instance"):
                    # trigger pipeline, so it could be cancelled
                    pipeline.PipelineManager(session_fixture).schedule_with_instance(self.PIPELINE_NAME)
                    while manager.last(self.PIPELINE_NAME, self.STAGE_NAME).data.result != 'Unknown':
                        time.sleep(1)

            return cass, manager.cancel()
Пример #2
0
    def do_cancel(self, manager, cass, session_fixture):
        if not len(cass.requests):
            # trigger pipeline, so it could be cancelled
            pipeline.PipelineManager(session_fixture).schedule_with_instance(
                self.PIPELINE_NAME)
            while manager.last(self.PIPELINE_NAME,
                               self.STAGE_NAME).data.result != 'Unknown':
                time.sleep(1)

        return manager.cancel()
Пример #3
0
 def stage_instance_from_pipeline(self, my_vcr, session_fixture):
     with my_vcr.use_cassette("stage/stage_instance_from_pipeline"):
         return pipeline.PipelineManager(session_fixture).find('Consumer_Website').history()[0].stages()[0]
Пример #4
0
 def mock_manager(self, mock_session):
     return pipeline.PipelineManager(session=mock_session)
Пример #5
0
def manager(session_fixture):
    return pipeline.PipelineManager(session=session_fixture)
Пример #6
0
 def job_instance_from_pipeline(self, my_vcr, session_fixture):
     with my_vcr.use_cassette("job/job_instance_from_pipeline"):
         return pipeline.PipelineManager(session_fixture).find(
             self.PIPELINE_NAME).history()[0].stages()[0].jobs()[0]