Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
940 B
Python
Raw Permalink Normal View History

import sys
import pytest
from metadata.generated.schema.entity.data.topic import Topic
from metadata.workflow.metadata import MetadataWorkflow
if not sys.version_info >= (3, 9):
pytest.skip("requires python 3.9+", allow_module_level=True)
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