] # Action executions requirements ACTION_PARAMS = {'friend': 'Rocky'} NON_EMPTY_RESULT = 'non-empty' # Non-workbook with a single workflow WF1_META_FILE_NAME = 'workflow_v2.yaml' WF1_META_FILE_PATH = TEST_PACK_PATH + '/actions/' + WF1_META_FILE_NAME WF1_META_CONTENT = loader.load_meta_file(WF1_META_FILE_PATH) WF1_NAME = WF1_META_CONTENT['pack'] + '.' + WF1_META_CONTENT['name'] WF1_ENTRY_POINT = TEST_PACK_PATH + '/actions/' + WF1_META_CONTENT['entry_point'] WF1_ENTRY_POINT_X = WF1_ENTRY_POINT.replace(WF1_META_FILE_NAME, 'xformed_' + WF1_META_FILE_NAME) WF1_SPEC = yaml.safe_load( MistralRunner.get_workflow_definition(WF1_ENTRY_POINT_X)) WF1_YAML = yaml.safe_dump(WF1_SPEC, default_flow_style=False) WF1 = workflows.Workflow(None, {'name': WF1_NAME, 'definition': WF1_YAML}) WF1_OLD = workflows.Workflow(None, {'name': WF1_NAME, 'definition': ''}) WF1_EXEC = { 'id': str(uuid.uuid4()), 'state': 'RUNNING', 'workflow_name': WF1_NAME } WF1_EXEC_CANCELLED = copy.deepcopy(WF1_EXEC) WF1_EXEC_CANCELLED['state'] = 'CANCELLED' # Workflow with a subworkflow action WF2_META_FILE_NAME = 'workflow_v2_call_workflow_action.yaml' WF2_META_FILE_PATH = TEST_PACK_PATH + '/actions/' + WF2_META_FILE_NAME WF2_META_CONTENT = loader.load_meta_file(WF2_META_FILE_PATH)
TEST_PACK_PATH, fixturesloader.get_fixtures_packs_base_path() + '/core' ] # Action executions requirements ACTION_PARAMS = {'friend': 'Rocky'} NON_EMPTY_RESULT = 'non-empty' # Non-workbook with a single workflow WF1_META_FILE_NAME = 'workflow_v2.yaml' WF1_META_FILE_PATH = TEST_PACK_PATH + '/actions/' + WF1_META_FILE_NAME WF1_META_CONTENT = loader.load_meta_file(WF1_META_FILE_PATH) WF1_NAME = WF1_META_CONTENT['pack'] + '.' + WF1_META_CONTENT['name'] WF1_ENTRY_POINT = TEST_PACK_PATH + '/actions/' + WF1_META_CONTENT['entry_point'] WF1_ENTRY_POINT_X = WF1_ENTRY_POINT.replace(WF1_META_FILE_NAME, 'xformed_' + WF1_META_FILE_NAME) WF1_SPEC = yaml.safe_load(MistralRunner.get_workflow_definition(WF1_ENTRY_POINT_X)) WF1_YAML = yaml.safe_dump(WF1_SPEC, default_flow_style=False) WF1 = workflows.Workflow(None, {'name': WF1_NAME, 'definition': WF1_YAML}) WF1_OLD = workflows.Workflow(None, {'name': WF1_NAME, 'definition': ''}) WF1_EXEC = {'id': str(uuid.uuid4()), 'state': 'RUNNING', 'workflow_name': WF1_NAME} WF1_EXEC_CANCELLED = copy.deepcopy(WF1_EXEC) WF1_EXEC_CANCELLED['state'] = 'CANCELLED' # Workflow with a subworkflow action WF2_META_FILE_NAME = 'workflow_v2_call_workflow_action.yaml' WF2_META_FILE_PATH = TEST_PACK_PATH + '/actions/' + WF2_META_FILE_NAME WF2_META_CONTENT = loader.load_meta_file(WF2_META_FILE_PATH) WF2_NAME = WF2_META_CONTENT['pack'] + '.' + WF2_META_CONTENT['name'] WF2_ENTRY_POINT = TEST_PACK_PATH + '/actions/' + WF2_META_CONTENT['entry_point'] WF2_ENTRY_POINT_X = WF2_ENTRY_POINT.replace(WF2_META_FILE_NAME, 'xformed_' + WF2_META_FILE_NAME) WF2_SPEC = yaml.safe_load(MistralRunner.get_workflow_definition(WF2_ENTRY_POINT_X))
TEST_PACK_PATH, fixturesloader.get_fixtures_packs_base_path() + '/core' ] # Action executions requirements ACTION_PARAMS = {'friend': 'Rocky'} NON_EMPTY_RESULT = 'non-empty' # Non-workbook with a single workflow WF1_META_FILE_NAME = 'workflow_v2.yaml' WF1_META_FILE_PATH = TEST_PACK_PATH + '/actions/' + WF1_META_FILE_NAME WF1_META_CONTENT = loader.load_meta_file(WF1_META_FILE_PATH) WF1_NAME = WF1_META_CONTENT['pack'] + '.' + WF1_META_CONTENT['name'] WF1_ENTRY_POINT = TEST_PACK_PATH + '/actions/' + WF1_META_CONTENT['entry_point'] WF1_ENTRY_POINT_X = WF1_ENTRY_POINT.replace(WF1_META_FILE_NAME, 'xformed_' + WF1_META_FILE_NAME) WF1_SPEC = yaml.safe_load(MistralRunner.get_workflow_definition(WF1_ENTRY_POINT_X)) WF1_YAML = yaml.safe_dump(WF1_SPEC, default_flow_style=False) WF1 = workflows.Workflow(None, {'name': WF1_NAME, 'definition': WF1_YAML}) WF1_OLD = workflows.Workflow(None, {'name': WF1_NAME, 'definition': ''}) WF1_EXEC = {'id': str(uuid.uuid4()), 'state': 'RUNNING', 'workflow_name': WF1_NAME} WF1_EXEC_PAUSED = copy.deepcopy(WF1_EXEC) WF1_EXEC_PAUSED['state'] = 'PAUSED' # Workflow with a subworkflow action WF2_META_FILE_NAME = 'workflow_v2_call_workflow_action.yaml' WF2_META_FILE_PATH = TEST_PACK_PATH + '/actions/' + WF2_META_FILE_NAME WF2_META_CONTENT = loader.load_meta_file(WF2_META_FILE_PATH) WF2_NAME = WF2_META_CONTENT['pack'] + '.' + WF2_META_CONTENT['name'] WF2_ENTRY_POINT = TEST_PACK_PATH + '/actions/' + WF2_META_CONTENT['entry_point'] WF2_ENTRY_POINT_X = WF2_ENTRY_POINT.replace(WF2_META_FILE_NAME, 'xformed_' + WF2_META_FILE_NAME) WF2_SPEC = yaml.safe_load(MistralRunner.get_workflow_definition(WF2_ENTRY_POINT_X))