OpenMetadata/ingestion/tests/unit/test_workflow_parse_example_config.py
Pere Miquel Brull d8e288626c
Storage connection naming, ADLS service and namespace packaging (#12810)
* Update storage connection naming

* Update storage services and remove typing of generic service

* Remove inits for namespace package

* Add test connection

* Revert "Remove inits for namespace package"

This reverts commit 89f1ae9ea8a633593776f51caf2586d2110d4636.

* Add enum

* Remove init to allow namespace packaging in some modules

* Remove init to allow namespace packaging in some modules

* Move examples and fix test

* Format

* Linting
2023-08-10 07:32:58 +02:00

26 lines
850 B
Python

from os import walk
from pathlib import Path
from unittest import TestCase
import yaml
from metadata.ingestion.api.parser import parse_workflow_config_gracefully
class TestWorkflowParse(TestCase):
"""
Test parsing scenarios of JSON Schemas
"""
def test_parse_workflow_config(self):
package_path = f"{Path(__file__).parent.parent.parent}/examples/workflows"
workflow_files = [files for _, _, files in walk(package_path)]
for yaml_file in workflow_files[0]:
with self.subTest(file_name=yaml_file):
with open(f"{package_path}/{yaml_file}", "r") as file:
file_content = file.read()
self.assertTrue(
parse_workflow_config_gracefully(yaml.safe_load(file_content))
)
file.close()