import pytest from metadata.generated.schema.entity.data.topic import Topic from metadata.workflow.metadata import MetadataWorkflow def test_ingest_metadata(patch_passwords_for_db_services, run_workflow, ingestion_config, metadata_assertions): run_workflow(MetadataWorkflow, ingestion_config) metadata_assertions() @pytest.fixture( scope="module", params=[ "customers-100", "organizations-100", "people-100", ], ) def metadata_assertions(metadata, db_service, request): def _assertions(): topic: Topic = metadata.get_by_name( entity=Topic, fqn=f"{db_service.fullyQualifiedName.root}.{request.param}", fields=["*"], nullable=False, ) assert topic.messageSchema is not None return _assertions