mirror of
https://github.com/datahub-project/datahub.git
synced 2025-07-24 10:00:07 +00:00
41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
![]() |
from freezegun import freeze_time
|
||
|
|
||
|
from datahub.ingestion.run.pipeline import Pipeline
|
||
|
from tests.test_helpers import mce_helpers
|
||
|
|
||
|
FROZEN_TIME = "2020-04-14 07:00:00"
|
||
|
|
||
|
|
||
|
@freeze_time(FROZEN_TIME)
|
||
|
def test_feast_repository_ingest(pytestconfig, tmp_path, mock_time):
|
||
|
test_resources_dir = pytestconfig.rootpath / "tests/integration/feast"
|
||
|
output_path = tmp_path / "feast_repository_mces.json"
|
||
|
|
||
|
pipeline = Pipeline.create(
|
||
|
{
|
||
|
"run_id": "feast-repository-test",
|
||
|
"source": {
|
||
|
"type": "feast",
|
||
|
"config": {
|
||
|
"path": str(test_resources_dir / "feature_store"),
|
||
|
"environment": "PROD",
|
||
|
},
|
||
|
},
|
||
|
"sink": {
|
||
|
"type": "file",
|
||
|
"config": {
|
||
|
"filename": str(output_path),
|
||
|
},
|
||
|
},
|
||
|
}
|
||
|
)
|
||
|
|
||
|
pipeline.run()
|
||
|
pipeline.raise_from_status()
|
||
|
|
||
|
mce_helpers.check_golden_file(
|
||
|
pytestconfig,
|
||
|
output_path=output_path,
|
||
|
golden_path=test_resources_dir / "feast_repository_mces_golden.json",
|
||
|
)
|