Files
open-metadata--openmetadata/ingestion/tests/unit/test_workflow_parse_example_config.py
wehub-resource-sync bf2343b7e4
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:35:45 +08:00

28 lines
1.0 KiB
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}/src/metadata/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): # noqa: SIM117
with open(f"{package_path}/{yaml_file}", "r") as file: # noqa: PTH123
file_content = file.read()
try:
parse_workflow_config_gracefully(yaml.safe_load(file_content))
except Exception as exc:
assert False, f"Error parsing {yaml_file}: {exc}" # noqa: B011
finally:
file.close()