Imri Paran 5133c31d31
MINOR: kafka integration tests (#17457)
* tests: kafka integration

kafka integration tests with schema registry

* added ignore kafka for python 3.8

* fixed tests
2024-08-21 16:05:09 +05:30

38 lines
940 B
Python

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